Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress: Prepend title (in header) with parent?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #242031
    gulliver
    Participant

    Is there a way to prepend the page title (not in the loop, but in the title element in the page header), with the title of the parent page?

    Not bothered about SEO, I sometimes use short page titles for greater clarity in breadcrumbs – but this delivers titles which, in tabs or history, are inadequate.

    A typical example might be where an individual episode of a radio show is simply named ‘e54’… which is good for breadcrumbs (/programs/show-name/e54/) but useless as a browser tab/history title.

    I already use conditional tags for various mods to page titles, and can modify the above example accordingly, but it requires manually adding the page id and the prepending text. Plus, it has to be done individually for each episode.

    So I’m looking for a conditional which can be applied if the parent of a page is [whatever].

    #251239
    Atelierbram
    Participant

    Your page title is not within “the loop”? If not, wouldn’t it be possible to move the while ( have_posts() ) : the_post(); tag up above this title? This would make live easier, anyway I found this article with searching, which will probably work within the loop.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.