Forums

Displaying page metadata on posts page (3 posts)

  1. blocka
    Member
    Posted 1 year ago #

    I have a static home page, and a page which is set as my "posts page".
    In this page, I'm trying to display some custom fields in header.php. Unfortunately, the $post variable seems to be equal to my latest blog post...not the page. I therefore can't get any metadata about the page to display.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Which page are you trying to test? Remember that your posts page will be using the index.php template file - not page.php.

  3. Stephanie Leary
    Member
    Posted 1 year ago #

    blocka, try using get_post_meta() and give it the ID of your static home page.

Topic Closed

This topic has been closed to new replies.

About this Topic