Support » Fixing WordPress » wp 'dynamic' title

  • I am having an issue with the below:

    <title><?php if (is_single() || is_page()) { wp_title('',true); } else { bloginfo('description'); } ?> — <?php bloginfo('name');?></title>

    It works perfectly for Pages and Posts, however the home page only shows:
    — <?php bloginfo('name');?>

    Instead of the intended:
    <?php bloginfo('description'); ?> — <?php bloginfo('name'); ?>

    Any ideas???

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    please post a link to your site.

    what is your text in dashboard – settings – general – tagline?

    The link to the draft site is here.

    The tagline text says: “Specialising in the care of People with Dementia in Teignmouth, Devon”

    Michael

    (@alchymyth)

    Forum Moderator

    possibly because you have a static front page;

    try:

    <title><?php if (is_single() || is_page()) { wp_title('',true); } elseif(is_front_page()) { bloginfo('description'); } else { bloginfo('description'); } ?> — <?php bloginfo('name');?></title>

    Thanks for your reply.

    That doesn’t seem to work either, I had also tried something similar:

    <title><?php if (is_single() || is_page()) { wp_title('',true); } elseif (is_front_page()) { bloginfo('description'); } ?> — <?php bloginfo('name');?></title>

    I know it must be simple – so it’s driving me insane!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp 'dynamic' title’ is closed to new replies.