WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Customizing my Title (5 posts)

  1. MaddTechWF
    Member
    Posted 4 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  3. MaddTechWF
    Member
    Posted 4 years ago #

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

    Example
    SiteName >> About
    SiteName >> Contact
    SiteName

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    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>
  5. MaddTechWF
    Member
    Posted 4 years ago #

    Thank you sooo much... that worked great.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.