New WordPress Plugin: Custom Title Attributes
Mon, 5 November, 2007 – 11:16 am
Yes, I've been busy again and have created my second (well second released) WordPress Plugin. Custom Title Attributes allow you to change the title attribute of page links displayed using the wp_list_pages() template tag in WordPress.
I created this for use on the various sites we have running WordPress as a CMS. I noticed about 6 months ago that the title attributes used on the Page links contained identical text to the anchor text - a waste of time in my opinion. I only add a title attribute if I think it's needed, which at times it is. After searching high and low I couldn't find anything that did this, so after a bit of studying of the Plugin Codex I realised that there was a way to do it. After a lot of learning of Pattern Syntax I finally cracked it.
It's a pretty simple plugin that just gives you an extra field (custom field actually, but I've put it below the content area) to complete when you add or edit a page to your site. It's not CMS specific as a lot of blogs have additional pages and this will kill off any duplicate title attribute unless you add in your own custom one.
I've tested it on a few sites including sites with and without permalinks, and sites with sub pages as well as top level. It's seemed fine but if you give it a go and find an issue please let me know on the plugin page


8 Responses to “New WordPress Plugin: Custom Title Attributes”
That's a cool plugin Sarah. The wp_list_pages function has always been a little limited to me. I get around it by just forgetting about it all together and entering the links manually.
Keeping everything inside WordPress, your way, is probably a lot handier! xD
By Michael from Pro Blog Design on Nov 5, 2007
Using the page list is certainly handier when you allow clients to add extra pages, or have someone maintaining the site who doesn't know any HTML

I've found a plugin that allows you to easily exclude pages from the wp_list_pages() output as well so theoretically no code needs touching with these two plugins in use
By Sarah on Nov 5, 2007
lol - That's true. No doubt they will appreciate it.
By Michael from Pro Blog Design on Nov 6, 2007
It just means more control for them and less need for dependency on us. Which is always a good thing
By Sarah on Nov 7, 2007
Handy plugin, thanks. It was annoying me how i had to have the same title for every page so this was exactly what i needed
By Durkin on Jan 17, 2008
Hi Durkin, glad to have helped
Cheers for letting me know.
By Sarah on Jan 17, 2008
Thank you! Exactly what I was looking for to use in my website redesign!
By Lisa on Apr 21, 2008
Glad to have helped Lisa
By Sarah on Apr 21, 2008