Skip to content

Possible <h1> not showing Bug on Frontpage? #9

@amiga-500

Description

@amiga-500

In header.php you have the line

if (is_front_page() && is_home()) : ?>

Under wp's Settings > Readings when set to static page it is here where is_front_page() and is_home() have an affect. Meaning, what you select for "Homepage" determines if is_front_page() returns true/false (if u are on that specific page or not), and what you select under "Post Page" determines if is_home() returns true/false ) if u are on that specific page or not). If you attempt to select the same page for BOTH "Homepage" and "Post Page" then wordpress returns a warning message saying both fields shouldn't point to the same page.

That being said, i think your line about is_front_page && is_home() could be wrong since it can never be both at the same time. I think you want it to say just

if (is_front_page()) : ?>

OR

if (is_front_page() || is_home()) : ?>

Love to get your feedback as to why you used the && because as of right now when you set "Homepage" to Front page and "Post page" to nothing then your php line will never trigger. Even when i set Front page and Post page to the same page it still doesn't trigger. I think because Wordpress is denying it (ie. is_home() is returning false despite both pointing to the same page).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions