New WordPress Plugin: Custom Title Attributes

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 πŸ™‚

Custom Title Attributes

You may also like...

8 Responses

  1. 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

  2. Sarah says:

    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 πŸ™‚

  3. lol – That’s true. No doubt they will appreciate it. πŸ˜€

  4. Sarah says:

    It just means more control for them and less need for dependency on us. Which is always a good thing πŸ˜‰

  5. Durkin says:

    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 πŸ™‚

  6. Sarah says:

    Hi Durkin, glad to have helped πŸ™‚ Cheers for letting me know.

  7. Lisa says:

    Thank you! Exactly what I was looking for to use in my website redesign!

  8. Sarah says:

    Glad to have helped Lisa πŸ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: