WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Category Post in Header File (3 posts)

  1. Jaecie
    Member
    Posted 4 years ago #

    Site Index
    On my personal blog, I wanted to have two sections on my layout for wordpress posts. The top section is my journal, which is in its own category. The bottom section has its own category of posts to display as well, but I also want it to be the place for content.

    What my goal was, was to have my journal posts displayed on every page, so I put my wordpress code for that specific category of posts in the header. The bottom section posts' code is within the index.php file, so that my content could open up in that section on separate pages.

    My problem is that the journal post code is bringing up errors for my content pages (created outside of wordpress).

    Fatal error: Call to undefined function bloginfo() in /home/jaecien1/public_html/wp-content/themes/CRE8/header.php on line 12

    Header.php Code
    Index.php Code
    Owner.php Code

    Thanks very much for any help!

  2. wprelief
    Member
    Posted 4 years ago #

    If you are including WordPress code in non-wordpress pages, you will see these issues because the functions are not "in scope" which basically means they are not available.

    I would suggest either trying to include the WordPress files on those pages or not include the WordPress theme files for those pages.

  3. Jaecie
    Member
    Posted 4 years ago #

    Okay, thanks for letting me know! I think I will just make a second header file for all of the pages on my site. In the journal part, instead of the entry, I'll just put up featured links/updates on the site or something.

Topic Closed

This topic has been closed to new replies.

About this Topic