Custom Title Attributes

The custom page title attribute plugin has now been superceded by the Page Menu Editor, which incorporates this plugin along with the option of editing the menu label too.

Updates will not continue on this plugin, so instead I recommend you switch to using the new plugin.

31 Responses

  1. Bob! says:

    The pages I have currently are pretty much self-explanitory but I have a few plans for adding more that this will be handy for. Thanks for taking the time to code it 🙂

  2. Sarah says:

    Thing is, this plugin removes the title attribute (unless you set a custom on) for each page. Afterall, what’s the point of repeating the anchor text in the title attribute? I’ll only set custom ones if they need it, otherwise I’d rather have no title attribute at all 😉

  3. Ben Partch says:

    Cool, I will check it out. 🙂

  4. Sarah says:

    Cheers Ben. Let me know if you stumble across any problems (shouldn’t do) or have any additional ideas, as I couldn’t think of any 😉

  5. Sarah says:

    Seems my pattern matching didn’t want to work on a couple of sites so I’ve changed the code to one I know works. Back to the books to get the better idea/method working!

  6. Jalaj says:

    Great plugins… seeing more of codes/wordpress than AIS… now I got why you changed the blog url

  7. Sarah says:

    Jalaj, I still have both blogs. You’re just on the techie one 😉

  8. Jalaj says:

    Seems like I followed “Pattern matching with PHP” link on your AIS blog to reach here… Not wrong if someone says “you learn by your mistakes…” as I will learn more of wordpress and PHP following a mistaken click… I am feeling like Columbus… great to discover this blog… don’t know how I missed it earlier.

  9. Sarah says:

    Maybe I need a bigger header to denote where people are? Still, glad you’re liking both sites. The front page of the domain links to and displays from both 🙂

  10. Sarah says:

    Upgraded this plugin to
    a: Not display on the Add/Edit Post page
    b: Fit in with the new WordPress 2.5 design

  11. This is just what I was looking for.

    However, I also use the wswwpx_fold_page_list() plug-in for my menu.
    I’ve tried editing your plug-in, replacing “wp_list_pages” with “wswwpx_fold_page_list”, but can’t get it to work.
    Any ideas?

    PS: I’m not a coder so I’m probably missing something simple! 🙂

  12. Sarah says:

    Hi Chris,

    The plugin uses a built in ‘hook’ to grab the page list and alter it. It probably won’t work on a plugin as the plugin wouldn’t be known within the core WordPress files. Your best option is to perhaps contact the plugin author and ask them if it’s possible to get them to add the title attribute option in. Point them to this page and tell them to grab the admin code from my plugin if they want 🙂

    If you get no joy let me know and I’ll take a look at the plugin and see if I can amend it myself for you.

  13. Lana says:

    Hi Sarah,

    Is it possible to modify the list pages code so
    that you can choose the text used to create the links?

    For example, a page title might be “The Future
    Search Principles for Businesses, Organizations
    and Communities.” But I want the link in the
    Page list to be “Future Search Principles.”

    I want to avoid hard-coding the list links,
    so any help you could provide would be great. Do you know of any plugins that would provide
    this capability? If not, I would like to discuss costs for customization work.

    Thank you!

  14. Sarah says:

    Hi Lana, your best option would be to add in either the SEO Title Tag plugin or the All-in-one SEO pack plugin, which will allow you to change the title of the page, then when you create your page your page link will use the title of the page specified at the top of the Write Page page, and the title of the page will use the custom title given using the plugin (if that all makes sense!).

  15. Lana says:

    I don’t understand yet. But I have the All in One SEO installed, so I’ll play around and see what happens. Thanks!

  16. Lana says:

    I understand that I can change the Title tag using All in One SEO, and that’s great. But for additional SEO purposes, I want the page “headline” to contain key words (in my theme, the page title/headline uses the H1 tag). So unless I’ve misunderstood your directions, I still have the same issue of the page headline being used to create the link text.

    Sorry if I’m not being clear about what I want 🙂

  17. Sarah says:

    Hi Lana,

    Alter your single.php page to not display the tag the_title() between the h1 tags, remove the h1 tags line in fact, then in your posts create your page headline title within the content area.

    So you’d control your page title via the All-in-one SEO pack title box, you’d control your page heading via the content box by adding the title you want at the top between h1 tags, and then your page link anchor text is set in the page title box.

    This is how I’ve done it on other sites without a problem 🙂

  18. Lana says:

    Woo hoo! That worked! I’ve spent hours searching for this information. Thank you so much.

    Do you have a donation button?

  19. Sarah says:

    Glad to hear it Lana 😀 Yes my donation button is on my plugins page 🙂

  20. Chris says:

    “…hover your mouse over my pages on the right, ‘Learn PHP’ should display a tool tip of ‘Reference Guide to PHP Tutorials on StuffBySarah’…”

    Out of curiosity, I tried this (using Firefox 2) and the tooltip said, ‘View all posts filed under ‘Learn PHP.’ Therefore, I assume you are no longer using the plugin.

    As a non self-hosted WordPressMU user, the plugin wouldn’t have been an option for me, but you made some good points in your post. Excessive use of the ‘title’ attribute is not only unnecessary; it’s also bad for accessibility.

  21. Sarah says:

    Hi Chris, the plugin is still in use. You’ve hovered over the blog category Learn PHP, up top are my pages along the horizontal nav where you’ll find the page. I know, it’s confusing, I’ll get that changed!

    I must admit, it is quite surprising that WordPress uses it as default, and quite a few people are surprised when they find out from what I’ve seen. I completely agree with the RNIB over the issues of excessive use. I know a few developers that feel that it’s acceptable, I guess they’ve never had to rely on a screen reader before.

  22. Kim says:

    I’m using this plugin with WP 2.6.1, and I’ve noticed that each time I edit a page, the custom fields set by this plugin are being duplicated – one instance for each page revision (10 revisions = 10 custom fields with the same content).

    I’ve turned off revisions on my install for the moment and that has resolved this temporarily. Is there something that needs to be changed in the plugin to prevent this from happening, or is this a WP bug?

  23. Sarah says:

    I’ve not had a chance to test the plugins out on 2.6.1 yet but there shouldn’t be any reason why they won’t work, unless the new subversion system is causing the problem.

    I’ll try and take a look this week and update the post (and plugin if necessary) accordingly.

  1. Sun, 27 April, 2008

    […] Custom Page Link Title Attributes […]

  2. Tue, 6 May, 2008

    […] She was unable to get Mark’s plugin to work either, so she wrote one of her own (Custom Title Attributes 1.3 by Sarah G). I’ve downloaded and installed it, and it works like a charm, as you can see by hovering […]