PHP – referencing a specific page content on home page
-
Hi there,
I hate to make a new thread, but I couldn’t find the information that I was looking for.
Currently, this is my code for the home page:
<div class="Part2Cont"><div id="BlogNews">
<div class="leftelement">
<h2>TITLE 2</h2>
<div class="arrowgrey"><img src="<?php echo bloginfo('template_url'); ?>/img/greyarrow.gif" class="arrowtitle"/></div>
<div style="clear: both;"></div>
<!--blog posts-->
<?php
query_posts($query_string . '&cat='. $options['blog_category'].'&posts_per_page=1'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="posts_home">
<?php
$data = get_post_meta($post->ID, 'TheLoft', true);
if ($data['BlogImage']!=''){
?>
<div class="NewsContentContainer">
<img src="<?php echo bloginfo('template_url')?>/timthumb.php?src=<?php echo $data['BlogImage'];?>&h=60&w=60&zc=1" />
</div>
<?php }?>
<div class="NewsContentHome <?php if ($data['BlogImage']==''){echo 'NewsContentHome_noImage';}?>">
<div class="home_blog_title">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></div>
<div class="t3text blog_text_home <?php if ($data['BlogImage']==''){echo 'blog_text_home_noImage';}?>"><?php echo TrimExplode(get_the_excerpt())?></div>
</div>
<div style="clear: both;"></div>
</div> <!-- closes the first div box -->
I’m trying to get the area where “TITLE 2” is displayed to reference a static page title of my choice and content (nothing more). It currently displays an excerpt of the most recent blog post. Any ideas without installing any new plugins? Thanks!
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
-
As the Support Bot says, you’ll need to go to the WordPress.org forms – http://wordpress.org/support/ for help with issues with self-hosted, WordPress.org powered blogs.
- The topic ‘PHP – referencing a specific page content on home page’ is closed to new replies.