WordPress.org

Support

Support » Themes and Templates » [Resolved] Customizing my Title

[Resolved] Customizing my Title

  • I was wondering if anyone could shed some light on this for me.

    I’m wanting to have the title of my site change dynamically depending on the page they are currently on. The one thing that I want to stay the same is the title of the site.

    I’m fairly new to PHP so I’m a little unfamiliar with the structure.

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

    @esmi

    Forum Moderator

    I’m wanting to have the title of my site change dynamically depending on the page they are currently on.

    This line…

    The one thing that I want to stay the same is the title of the site.

    and this line…

    …completely contradict each other. A link to a site demonstrating the problem might help.

    Well i want my site name to be there but have the page they are on change.

    Example
    SiteName >> About
    SiteName >> Contact
    SiteName

    esmi

    @esmi

    Forum Moderator

    Try something like:

    <title>if (is_category() || is_author()) {wp_title(':',true,'right');bloginfo('name');}
    elseif(is_tag()) {_e('Entries tagged with ');wp_title('',true);if(wp_title('',false)) {echo ' : ';}	bloginfo('name');}
    elseif(is_archive() ) {_e('Archives for ');bloginfo('name');}
    elseif(is_404()) {bloginfo('name');_e(' - Page not found!');}
    elseif (have_posts()) {wp_title(':',true,'right');bloginfo('name');}
    else {bloginfo('name');}?>
    </title>

    Thank you sooo much… that worked great.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Customizing my Title’ is closed to new replies.