The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Included file, wordpress functions don't work (1 post)

  1. jrm213
    Posted 8 years ago #


    I have a static front page that has the same menu as all my other pages. I made a page menu.php that I include in the home page and the page.php.

    However, when I include the menu.php file, any of the wordpress functions in it cause "call to undefined function" errors.

    This should be the same as calling get_header() or get_footer() all those functions do is run an include_once call on a specific file, which is what I am doing, but functions like is_home or wp_list_pages work in header.php and footer.php but not in my menu.php. Can anyone shed some light on what is going on?

    Also this include is run after get_header but before get_footer. Like I said those functions work in get_header and get_footer.


Topic Closed

This topic has been closed to new replies.

About this Topic