WordPress.org

Support

Support » Plugins and Hacks » if is_home Help Please?

if is_home Help Please?

  • Hi everyone,

    I’ve got an issue I’m hoping someone can help with. I’m building a template that features a custom field pulled into an H2 tag in the header. It’s basically a two sentence description on what the page is about. No worries on any of the pages, but I’m trying to figure out how to get the same thing to happen on our blog/posts page.

    This is my first try using the is_home function, but I can’t seem to get it working. Can anyone help me out and tell me what is wrong with the following code? I’ve tried putting it inside the <head> tags and the <body> tags, but it doesn’t seem to make a difference.

    <?php if(is_home()) {
    	<h1 class="page-heading">This is our fancy, shiny blog!</h1>
    	} else {
    	<h1 class="page-heading"><?php echo get_post_meta($post->ID, 'Page Heading', true); ?></h1>
    	}
    	?>

    Thanks everyone.

    Cheers,

    Chris

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘if is_home Help Please?’ is closed to new replies.