Jump to content
Sign in to follow this  
simplespirit

hook

Recommended Posts

simplespirit    0
simplespirit

Hi, I'd like to create a hook (if possible) to modify the <title></title> section of my pages. Basically, on all pages except the home page, I want to append the site name to the page title. Ex. for a blog page on this site it would show Blog | PageLines

Share this post


Link to post
Share on other sites
simplespirit    0
simplespirit

This adds a title like what I want. add_action('pagelines_code_before_head', 'add_sitename_to_title'); function add_sitename_to_title(){ echo "<title>";wp_title('|',true,'right');bloginfo('name');echo "</title>"; } The problem now is I have two titles in my head. How can I remove the pagelines default title?

Share this post


Link to post
Share on other sites
cmunns    16
cmunns

To be honest most of the SEO plugins out there will allow you to rewrite/define page titles more easily. That's what I would recommend.

Share this post


Link to post
Share on other sites
simplespirit    0
simplespirit

I tried the larger SEO plugins and they didn't give me what I wanted. I wound up editing the base code and commenting out the page title section in it. I'll just have to do it again with updates.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×