WordPress.org

Ready to get started?Download WordPress

Forums

page.php doesn´t work (3 posts)

  1. lonchbox
    Member
    Posted 2 years ago #

    Recently I experimented a really weird bug, every time I try to view a page doesn´t shows the page.php template use index.php, I thought could be some functions.php hacks I´m using (typical ones, login logo, remove dashboard widgets, etc) but even if I erase functions.php file the problem persist.

    So, to check what happend I insert a function on the header.php of the theme to see how it WP looks the content. The function I call is if_page located in wp-includes/themes.php.
    This is the answer if I get into a custom post type url:

    string(4) "home"
    bool(false)
    string(6) "single"
    bool(true)
    string(8) "category"
    bool(false)
    string(4) "page"
    bool(false)
    string(3) "tag"
    bool(false)

    and this is the result of get into a page url:

    string(4) "home"
    bool(true)
    string(6) "single"
    bool(false)
    string(8) "category"
    bool(false)
    string(4) "page"
    bool(false)
    string(3) "tag"
    bool(false)

    It should show true on page but wont.

    Any idea? I´m totally clueless :S :(

    Thanx.

  2. lonchbox
    Member
    Posted 2 years ago #

    Fixed! be carefull to create a custom post type with the same slug of a page, this it make me crazy :P

  3. lonchbox
    Member
    Posted 2 years ago #

    Well, it doesn´t was that, the problem persist even if I reinstall all (WP. themes, plugins) so found some info about rewrite in wordpress and this code works for me:

    [Code moderated as per the Forum Rules. Please use the pastebin]

Topic Closed

This topic has been closed to new replies.

About this Topic