Having trouble moving page name on the 'blog' (2 posts)

  1. napalm
    Posted 6 years ago #

    Hi All,

    I'm trying to move the page name into the header of the web page.

    I've used <?php echo $post->post_title ?> which works fine for all 'Pages', but when it comes to the 'News' page (the actual blog - I've created an actual page named 'News' and Ive assigned it to be the 'Posts Page'.) it displays the first title of the post, instead of 'News'.

    I have tried creating a 'custom field' named page-title. But I can get anything to show up using get_post_meta( $post->ID , 'page-title' , true );

    Any help is appreciated.

  2. napalm
    Posted 6 years ago #

    I have used <?php echo get_post_meta($post->ID, 'page-title', true); ?>
    which still works for all pages but the 'News' Page (this time displaying nothing).

Topic Closed

This topic has been closed to new replies.

About this Topic