Thanks for the suggestion, Doodlebee.
One of my aims with Alt-Link-Text is to let users set up short versions of their titles without having to either edit their theme files or switch to code view in the dashboard. The plugin doesn’t require users to add any HTML or CSS, which is always a good thing.
The plugin can also be used to modify a single navigation link; you don’t have to type in two versions of the title for every page as with your method.
The main concern I have with your approach, though, is that your WP database no longer has the expected structure. The post_title field no longer contains the post title (instead it contains the anchor text), and the post_content field no longer contains only the post content. As someone who believes in accurately labelling data so that it can easily be used in a variety of ways, this makes me uneasy!
It’s difficult to predict exactly what mislabelling the data might do, but here are a couple of knock-on effects:
– Fetching the page title using the_content() rather than the_title() means that any plugin that hooks into the_title() (e.g. to provide a thumbnail image next to it, to truncate it, etc.) is unlikely to work, and any plugin that hooks into the_content() (e.g. to link specified words, etc.) will affect your title too.
– The WordPress developers, in their great wisdom, have decided to apply different filters to page titles and page content. Your title is now being run through the other set of filters. (Whether this matters or not, I honestly don’t know, but it makes sense not to mess with these things without good reason.)
– If you did this with posts, I’d expect an RSS feed to show both your link text as the title, and your title as part of the content.
– If you ever want to insert something between your title and your content (e.g. author info, tags, etc.) this will be tricky, because with your method there’s no such place.
Obviously your method is working well for you at the moment, which is great, but I hope that this at least goes some way to explaining why I think the plugin is worthwhile.
Tim