Post Meta Box issue with blog/index page (1 post)

  1. digitalrenewal
    Posted 5 years ago #

    Ive added post meta boxes to display a title and description on the top of every post and page...

    I've set a static front page and a posts page called 'blog'.

    It works almost perfectly, just one glitch...

    When I load the blog page, it displays the meta data for the latest post, not the blog page meta.

    Im using the meta box code from wpshout for functions.php

    Heres the code added to header.php

    <?php if ( is_front_page() ) {
    	// DO NOTHING
    } else if (is_home() || is_page() || is_single() ) { ?>
    	<h1><?php echo get_post_meta($post->ID, "Title", true); ?></h1>
    	<?php echo get_post_meta($post->ID, "Description", true); ?>
    <? } ?>

    Can anyone tell me how to get the blog page to display the actual page meta, not the post meta???


Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by digitalrenewal
  • This topic is not resolved
  • WordPress version: 3.2.1