MaddTechWF
Member
Posted 3 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.
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.
MaddTechWF
Member
Posted 3 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
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>
MaddTechWF
Member
Posted 3 years ago #
Thank you sooo much... that worked great.