WordPress.org

Ready to get started?Download WordPress

Forums

Page Title Not Displaying (3 posts)

  1. Danny Albeck
    Member
    Posted 3 years ago #

    Hello,

    I have a custom theme I created for WordPress for a client's site. I am having a weird issue where The page title shows for the parent page, but not for the sub-page.

    This is my code:

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

    If anyone can help me out I would greatly appreciate it, I think I am just looking at this too much and missing something simple.

  2. Danny Albeck
    Member
    Posted 3 years ago #

    Any help would be great! I still can't get this figured out.

    http://wordpress.pastebin.com/6qZGsuXd <-- The code I am using.

  3. alchymyth
    Forum Moderator
    Posted 3 years ago #

    The page title shows for the parent page, but not for the sub-page.

    is that when you are on the parent page?
    or when you are on the sub-page?

    a link to the site illustrating the behaviour would be of advantage.
    is that the full code of the template (page.php?) ?

    i'll try to check in plain words what i think the code will do:

    if the page has a parent
    -then show the linked page title h2 (the linked parent title h4 is set to display:none;)
    else (i.e. the page has no parent)
    -try to get some header stuff, and if that does not work, show the title h2

    -then show the page content.

    it will always only show one title - of the page with a parent, linked (in which case there should also be a h4 in the html code of the browser); or of the page without a parent, unlinked.

    is that how it is intended?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags