[imp_desc]
This plugin adds a Visual Subtitle field to all post, page and custom post types that have support for a title.
It allows you to include a string of text that will still be part of the post title, but be wrapped in a span tag, giving something like:
<h1>Visual Subtitle<span class="subtitle"></span></h1>
Keeping it as part of the main level 1 or two heading, means it maintains as much keyword SEO importance as the main title, yet can be given a style (in your own theme) of display: block; to make it visually appear as a subtitle.
The visual subtitle is appended to to the title on on the Posts screen, separated with a pipe (|) character, and appended to the title part of the document title with a colon (:) character.
If you’re using a theme or plugin that allows for custom document titles different to the post title
Download
Download from WordPress Plugin Repository: Visual SubtitleAdd a subtitle or tagline to each post type that has a title v1.0.1 (1752 downloads).
Installation
- Unzip and upload
geoplugin-currency-shortcodefolder to the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
FAQ
- Can I change the separators?
- Only currently by amending the plugin code.
- My subtitle isn’t appearing on a new line?
- You need to add the
.subtitle { display: block; }style to your own theme, along with any other styling you want for it.
Changelog
1.0.1
- Fixed display issue on Comments page.
- Added key bit of code that makes the plugin read translation files (props to Dave for the reminder).
- Added link to German (de_DE) translation file in the readme.
1.0
- First public version.
This looks great! Can’t hurt your SEO, either.
It’s pretty much for SEO reasons that I decided to make this plugin the way I did. There are lots of plugins out there that add subtitles for a post, but I couldn’t find any that kept the subtitle text within the same markup as the title itself (be it h1, h2 etc). If nothing else, it provides an alternative way of adding subtitles, and it supports custom post types too, not just posts and/or pages.
Hmmmm…. looks good. Thanks!
This looks terrific, Gary – thank you so much for providing this plugin!
Very useful plugin! Is there any way to make subtitles work along with a multiple language plugin such as qtranslate, or any way to manage more than one language? Thanks a lot!
Hello Gary,
I installed your subtilte plugin tonight and activated it. Once I added a subtitle to a post and hit update, I recieved this message when trying to view the post on my site:
Warning: Missing argument 2 for Visual_Subtitle::filter() in /home/content/c/r/o/crowdshifter/html/wp-content/plugins/visual-subtitle/visual-subtitle.php on line 286
Any ideas on how to fix this? When I open the php code, there isnt anything on line 286, only 285 and 287.
I appreciate your help,
Thank you,
Jamie
Jamie (and Dorian),
I’ve tracked down the error you’re getting to an issue with WordPress itself. Keep an eye on http://core.trac.wordpress.org/ticket/16688 as that ticket includes a patch that will hopefully make it into the next version of WP.
Hi, Gary! Thanks for developing this plugin. Exactly what I needed for my client’s blog. I did have one issue, though – I don’t know if there’s an unclosed tag in the .php file (probably not!) or what, but when viewing individual posts, the subtitle text plus a > element shows on the top left corner of the blog, and the header is moved down a few pixels. Any ideas?
You can see the problem here:
http://lauragordonblog.com/2011/08/11/my-birthday/
How are you adding your Facebook Open Graph meta tags?
Noooot sure I’m following you? I’m sorry!
The error is coming from the inteference of my plugin with some code that is adding Facebook data to your page – I’m asking how is that Facebook code being added.
It’s actually added within the ProPhoto theme framework that she had installed on her blog. It’s an option within the theme – not a third party plugin. PROBABLY doesn’t help you much, huh?
I’ve now placed the project development into Github, so you can use that for reporting issues, forking and patching the code.
https://github.com/GaryJones/Visual-Subtitle
First TY for your plugin i love it!
But I have a problem but I am not sure if the fix needs to be in your code or somewhere else and I am hoping you can point me in the right dir for a fix. When someone searches for something say on Bing.com there is an error in the slideout “more on this page” on the search related to this plugin.
“Missing argument 2 for Visual_Subtitle::filter() in /home/content/76/8554876/html/wp-content/plugins/visual-subtitle/visual-subtitle.php on line 286″
You can see this if you do a bing search for “countdown to election 2012″
Any help would be much appreciated.
This is a bug with WP core, which is fixed in WP 3.3.
Yea, thank you for the response. I ended up seeing that. I do however wonder if that is the reason why under certain page titles the subtitle is appended to the name of the page.
I deactivated the plugin till the next update but can switch it back on for you to see what i am talking about, under category archive pages the title of the page “Politics” for example will show the subtitle for the most recent post appended to the word “Politics” at the top of the page.
Hi Gary… great plugin by the way. I’m suddenly having this same “missing argument 2″ bug on one of my live sites. It’s not doing it on the local development installation I have of this particular site (running in a MAMP installation on my local machine) but it’s doing it on the live version of the site. In both cases I have exactly the same installation (in fact, the code, aside from wp-config.php is a direct copy of everything locally, and the entire wordpress database was copied as is to the live site). Both are using WordPress 3.2.1, and both are using 1.0.1 of your plugin. No errors on the local site, errors out the wazoo on the live one. Any ideas why that might be? I don’t want to have to deactivate the plugin, as I’m relying on it for proper titling on this site, and it’s a live site… I’d have to reprogram several areas of my custom theme to account for having removed it….
Hi Steve,
As per my earlier comment – there is a bug in WP 3.2, which is fixed in WP 3.3 (which is at release candidate stage – so only a week or so until the gold release).
Thanks for the reply…. yes, I realize it’s fixed in 3.3; I just wondered if there was some way to correct it now, aside from disabling the plugin, because I now suddenly have a live web site that’s throwing PHP errors all over the page. I wasn’t sure how long I was going to have to wait for WordPress 3.3 to get rolled out.
I like the idea of this plugin, but I get the following message when I have the plugin activated. (It is currently deactivated.)
Warning: Missing argument 2 for Visual_Subtitle::filter() in . . . visual-subtitle.php on line 286
Any ideas on a fix?
Please ensure you are running the latest version of WP, since there is a bug in pre 3.3 versions.
Hello,
I tried using your plugin, and everything works fine, except one thing.
I am trying to have a subtitle exactly like my title, just a bit smaller. So when I try to style the subtitle in the CSS, it works well in the body of my blog, however it also changes the size of the subtitle appearing in my sidebar.
Since my titles are big (2em), making the subtitles slightly smaller (1.5em) makes them appear bigger than the titles in the sidebar (which are 1.1em)…
Do you have any idea how I could change the CSS of the subtitle without affecting the way it appears in the sidebar ?
Thank you very much.
Hi,
It sounds like you need to be more specific with your styling. What’s a URL showing the titles, subtitles and sidebar titles on the same page?
Hello,
Thanks for answering so fast !
Here is the URL : http://www.chezfood.com/ (it’s in french)
Right now I have deactivated the plugin (the subtitles are now included in the title with a <br> before them). But basically if you look at the first blog title, what I want to do is for the text saying “la pâte à tartiner préférée des martiens” to appear smaller, but when I do that this piece of text appears bigger on the left sidebar under “Articles récents”.
The subtitle on the right are a span, inside a h1, where as the subtitles on the right, would be a span inside a li. You can therefore target just the subtitles in the main content via:
h1 .subtitle {}
or
#content .subtitle {}
or some other simple hierarchical selector, so long as it doesn’t match the structure of the sidebar where you don’t want that particular style.
Well, I don’t know what to say, seems pretty straightforward and it works like a charm ! I’m fairly new to CSS so didn’t really understand the hierarchy thing until now.
THANK YOU ! Not only do the subtitles work as I want them to, but I’m sure I learned something that will be useful in the future !
Hello! In my post appears the following: subtitle “> Title post
How do I let the subtitle under the post?
Hi,
So far your plugin has given me exactly what I was looking for. Love it. However I am having one issue that I’ve been going round and round trying to resolve but to no avail. If you, or anyone else, could help fix this it would be great.
Problem: Once I add a subtitle to a post, it changes the byline to include the new subtitle but then the comments tag shows unwanted html and I can’t find where to either remove or fix that html tag. It reads like this: Posted on May 10, 2012 by jmueller • Sample Subtitle Here Comments” class=”entry-comments”>0 Comments
So you see there after “Sample Subtitle Here” it shows… Comments” class=”entry-comments”>0 Comments …That is the out of place html that I need removed or fixed.
Can anyone help to find where I can go fix this?
Thanks.