WP Title 2 - A Plug-in for WordPress
9 декември, 2008This plugin allows you to add and edit a Heading for your Pages, different from the Title (which is used in the links).
Description
If you use WordPress as a CMS for your website, and you want your headings and page links to be different, this plugin will help you.
It adds additional field in your Add/Edit Page form. When you fill it and save your Page, the new heading is stored in the DataBase. The plugin replaces thetitle() and wptitle() Template tags so that the new Heading is printed. Also, the Heading is printed in the title attribute in your page navigation links.
It is not necessary to fill the optional heading field – you can leave it empty and in that case your Page Title and Page Link will be the same.
This plugin is fully compatible with WP_Multilingual and qTranslate plugins, which allow you to post content in different languages.
Notice that the plugin will work only with one of them, not both!
This plugin is fully compatible from WordPress version 2.3.3 up to 2.7+. (note that compatibility with qTranslate is only for WP 2.7+)
Installation
Installation is extremely easy:
- Upload ‘wp-title-2′ directory to the ‘/wp-content/plugins/’ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
That’s all! Easy, eh?
Frequently Asked Questions
- Do I have to change my templates in order to make the plugin working?
No. You do not have to change anything. Simply unzip, upload and activate the plugin. - What will happen with my old Pages’ Title?
The default Title will be printed unless you add your custom heading - What will happen if I uninstall the plugin?
Again, the default Pages’ Title will be printed - My custom headings do not show! I use version 2.0*, what is the problem?
Have you deactivated and then activeated the plugin after the update from 1.* to 2.*? If not – try deactivate and activate WP-Title-2 - After updating to the latest version, the additional Heading field does not appear in Add/Edit Post form. What the hell happened?
Since version 2.0 the plugin does not affect Add/Edit Post pages. It is available only for Pages. Because the main idea is to separate Page Title from Page Link label (the one which appears in the Sidebar’s navigation). Posts do not appear in Sidebar’s navigation and it makes no sence to have different field for Heading.
Download
98 Коментари Напиши коментар
-
Barisko, 24 декември, 2008:
Could you please please please make this plugin work with qTranslate
(here is a forum post about integrating qTranslate with your plugin)
-
Barisko, 24 декември, 2008:
URL does not work
qTranslate: http://www.qianqin.de/qtranslate/
Forum post: http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=294 -
I will take care.
-
Hi,
It seems the plugin doesn’t like to take character & in it’s field.
Once I include a & in the title then plugin stop working.Thanks
John -
Hi John! (Happy New Year
)Thanks for your comment. I made a fix – please update to version 1.0.2!
-
Hi Ицката,
Thank you very much! it works great!
John -
Barisko:
The Plugin now works with qTranslate as well. Please update to 1.5!
-
Barisko, 23 януари, 2009:
That’s really really great!
Thank you so much! I hope many many Wordpress plugins will support qTranslate in the future!
Thanks Ицката!! -
I’m using version 1.5 on a few sites and I’m seeing this in the error logs of each…
PHP Warning: strpos() [function.strpos]: Empty delimiter in …/wp-title-2.php on line 125
Any ideas how to fix this.
Thanks for this handy plugin!
-
Hello Kevin,
thanks for your comment. I will take care for this problem as soon as I can.
Which file causes this warning?
-
Al I see in the error log is the above message with the path to and name of wp-title-2.php
This is the error, it’s all on one line in the error log.
PHP Warning: strpos() [<a href='function.strpos'>function.strpos</a>]: Empty delimiter in (path removed)/wp-title-2.php
-
It should be fixed now. Please update to version 1.5.1 !
-
Great. Thank you.
-
How do I make this plugin change the and page heading, WITHOUT changing the nav bar menu anchor text? I want „Home“ to still say „Home“ in the nav bar, but I want the page title and page heading to change.
-
„How do I make this plugin change the [code][/code] and page heading…“
-
Jecci, 20 април, 2009:
I tried the plugin in 2.7.0 and 2.7.1 and when I go to create new post, all I get is a huge blank space underneath Add New Post where it the plugin should show..? Am I missing something?
-
Hi Jecci,
could you please provide a screenshot and give me more detailed information (browser, installed plugins, etc.) ?
-
Jecci, 20 април, 2009:
Check it out this is what I get: http://www.flickr.com/photos/jessier101/3460541012/sizes/o/
-
My mistake.
I had disabled the plugin for Posts, it worked only for Pages.
This will be fixed and in a few minutes version 1.5.3 should be able for download.
Thank you for your comment!
-
Jecci, 20 април, 2009:
Cool.. Thanks!
-
Jecci, 21 април, 2009:
Thanks again… I am able to enter text into Heading (optional) section now but it doesn’t show up on the homepage… It is not working for me on any of my Posts… I tried it on 2.7.0 and 2.7.1… Do I need to change anything to the index.php?
-
No, you do not have to change anything in your templates or code – and that’s the main idea of the plugin.
It seems that something is not OK – I will take a look and make a fix as soon as I can.
Really sorry for this.. That happens when you want to make your plugin compatible with multiple versions of wordpress and other plugins
Thanks for your feedback!
-
Should be fine now. Please update the plugin to 1.5.4! Again, thanks for your feedback!
-
John Myrstad, 21 април, 2009:
Hi.
Thanks for a nice and very usable plugin. This is really helpful, because there are often problems with finding page titles that work as both menu items and headers.
However I`d like to propose that you make it compatible with Scribu`s Front-end-editor: http://scribu.net/wordpress/front-end-editor if possible.
Dev info here:
http://scribu.net/wordpress/front-end-editor/developer-guide.html
John Myrstad
-
Christy, 29 април, 2009:
Thanks for the plugin. I had the same thing created couple years ago for personal use, but when it broke with a wp update I could no longer get it to work correctly without adding additional code into themes.
I’ve installed your most recent version (1.5.3) but cannot get it to work on posts. Any suggestions?
-
Hi Christy,
actually the latest version of my plugin is 1.5.4
So please update!In 1.5.3 there was a problem and I fixed it in 1.5.4 (see comments above for details).
The main idea of WP Title 2 is to let you have different strings for the heading and for the link to your Pages, which is generated by wp_list_pages() function. This means that it is designed basically for Pages, and not for Posts, and it is useful if you use WordPress as a Content Management System for a website rather than for weblog.
It wasn’t so hard to make it work without changing the templates. The plugin applies some filters on the_title(), wp_title() and wp_list_pages() functions. The filters are simple replacing functions using regular expressions.
John Myrstad: John,
currently I do not plan to extend the plugin, but feel free to modify it in order to make it serving your needs
-
mark, 15 май, 2009:
Seems like your latest update broke edit page. I’d like to send you a screenshot?
-
Hi mark,
Thank you very much for the feedback! A fix is now released – please update to 2.0.1!
http://downloads.wordpress.org/plugin/wp-title-2.zip -
Hello, the new v2.0.3 breaks my navigation. I cant use it.
-
Hi fred,
please write your WordPress version, installed plugins and current theme. Thanks!
Until I take a look and fix the problem you may downgrade to 2.0.1:
http://downloads.wordpress.org/plugin/wp-title-2.2.0.1.zip -
current version WP2.7.1, using Shades of Blue Free theme by Brian Gardner, Have lots of plugins (which I tried deactivating some that I thought might cause trouble). Allinoneseo, cforms, akisment, google xml sitemap, Ibox, pagelinksto, pagemash, post tabs, revision control, sociable, thickbox content, wpstats, cms post control, dbmanager, limit post automatically, simple paypal shopping cart, wp title 2 2.0.2 (since new one breaks the homepage title). Your last version worked fine…
-
Actually 2.0.1 Is the last version that doesn’t break my titles. Newer versions also add other info when you „hover“ over the navs. Very weird.
-
Yeah, it is weird indeed.
I cannot see a reason for your problem. I use my plugin in 2-3 websites and it works. I’ve downloaded and tested your WP theme – also works fine. I’ve tested some of your plugins, except this one „pagelinksto“ – because I cannot find it, and there is no problem.
Have you made any modifications to your theme or plugins? Can you provide me a screenshot so I can see what exactly is the problem?
-
I have a screen shot… where do I email it to?
-
You’ve got mail
-
Jamie, 23 май, 2009:
Hello Hristo, thanks for the good work!
I’m running 2.7.1. I installed Title 2 through the plugin browser, and WP reports that it was installed correctly and is active. However, the optional „header“ field never appears on any of the edit, post or post-new pages
Just to be paranoid I downloaded it from this site and installed in manually, but that didn’t work either.
-
Hi Jamie,
since version 2.0+ the plugin works only for Pages. You will find the additional Heading field in your Add/Edit Page form. It is not available for Posts, practically you don’t need additional heading for your Posts, as they do not appear in the Sidebar’s navigation.
-
Jamie, 24 май, 2009:
Oh, that’s what I meant . . . obviously . . .
It’s hard to believe I read all the documentation and support pages substituting „post“ for „page“ each time in my head. I need more sleep and more coffee. Thank you!
-
Hristo, I tried everything, but the new v2.0.3 just conflicts with my PageMash and causes WP Title to mess up my navigation tabs. I have no idea how to fix this and for some reason can not duplicate it on my other „test“ site. I guess I am stuck with v2.0.1 which does not cause any problems.
-
Hi Fred,
I asked you to send me your screenshots again because I’ve deleted them by accident and you didn’t – please send them.
I want to help you and I will try to reproduce the bug and make a fix.
Try to uninstall and install my plug-in again, maybe it won’t help but you shall try it.
Anyways, you’ve already noticed that you may continue using version 2.0.1. It will be always available for download on plugin’s page:
http://wordpress.org/extend/plugins/wp-title-2/download/ -
Works great, thank you
-
You’re welcome
It should work fine now. Many thanks to Fred for his feedback. There was a bug which appeared in some particular situations. There is a fix now, version 2.0.4 is released.
-
chip, 3 юни, 2009:
I have just updated to the latest version and now I cannot have multiple lined headings. I previously used a () to force a line break and it worked, however now the page SHOWS the in my heading rather than forcing the line-break.
Am I doing something wrong?
-
Version 2.0.4 filters all HTML tags.
Version 2.0.6 is released now and it fixes this issue as well as some other issues. Please update to 2.0.5 and re-save your page headings.
Thanks for the feedback!
-
Hi,
Thanks for such a great plugin. It used to work for me earlier. But, after upgrading the recent plugin, the second title area does not get displayed no matter what I do.Please do let me know how I can rectify this.
-
Sorry, I have forgotten to upload the screenshot for your further checking,
-
Team Nirvana:
Since version 2.0 the plugin does not affect Add/Edit Post pages. It is available only for Pages. Because the main idea is to separate Page Title from Page Link label (the one which appears in the Sidebar’s navigation).
Still, if you would like to use it for Posts as well, simply open wp-title-2.php in your wp-content/plugins/wp-title-2/ directory, find lines 200 and 202 and uncomment them. But it will make no sence – Posts do not appear in Sidebar’s navigation and your Title field is quite enough
Greetings,
Hristo -
Thanks for the reply Hristo.
I wished to use the Second Title option for posts too as Ih ave observed significant boost in the traffic levels when I applied two titles for most of the posts.
Following your reply, 200th line in the wp-title-2.php is a blank line and the 202nd line is in turn uncommented, which is add_filter(‘wp_title’, ‘ct_wp_title’,999);
.Please provide a solution.
Thanks,
Suneel. -
Which version of the plugin do you use?
Anyways.. Find the following two lines (wp-title-2.php):
//add_action(‘edit_form_advanced’, ‘ct_addTitleField’);
//add_action(’simple_edit_form’, ‘ct_addTitleField’);.. and uncomment them (remove the slashes in the beginning of the lines).
-
Thanks for pointing out where I should edit the plugin. I am using version 2.0.6
I had been able to edit and I can see the optional heading. But, the layout is a bit disturbed.
Please watch this SS of how my editor looks right now
http://i39.tinypic.com/fualgp.jpg
Help me how I can make it look as it was earlier without disturbing the editor. I am not good at PHP.
Thanks for helping us out.
-
You’ve got email!
-
Thanks a ton Hristo.
It works like charm now.
-
cunninger, 22 юни, 2009:
Hello Everybody !
I don’t understand … why ’s it not working ?. I hope, Everybody can help me soon as able …
You can see the picture : http://img198.imageshack.us/img198/7789/wptitle2.png
Thanks all, best regrads … ^^
-
cunninger: Have you read the FAQ section? Question #5 gives you the answer:
http://blog.ickata.net/wp-title-2/#faqAlso, this problem is discussed 8 comments above yours and my explanation is below.
-
It’s not working with wp 2.8
-
Are you sure?
-
Fluid, 29 юни, 2009:
Hi – thanks for the great plugin! I’ve noticed that when I add a new page the optional heading that your plugin offers doesn’t get added the first time I save the page. However, after the first save I add the optional heading again, then save again and it works.
I’ve tried deactivating/activating, etc. I’m using WP 2.7.1 and WP Tile 2 version 2.0.8
I can live with it not saving the first time I try but curious if you have any ideas.
Thanks!
-
Hi Fluid,
Thanks for the feedback. It is a strange problem. I use my plugin in several WP installations and I cannot reproduce this bug. Can you be more detailed and tell me what other plugins do you use? To see if another plugin causes problems.
-
Fluid, 30 юни, 2009:
Hi, I found the plugin that’s causing the issue. I don’t like the WP Autosave feature so I found some plugin code from Untwisted Vortex. The code I used can be found here:
http://www.untwistedvortex.com/2008/06/27/adjust-wordpress-autosave-or-disable-it-completely/After deactivating the Disable Autosave plugin found at the link above your plugin works perfectly!
If I have to choose one I will choose WP Title 2 over the Disable Autosave plugin.
However, if you have an idea on how I can hack the Disable Autosave plugin code so they both work then I would really appreciate any insight.
Thanks for your help and for such a great plugin!
-
Many thanks for your cooperation and feedback!
I released a fix, please update the plugin to version 2.0.9 . You should not experience any problems with disabled autosave anymore!
-
Fluid, 1 юли, 2009:
Hi, I’ve downloaded and tested the updated 2.0.9 version and everything is working very well!
Thanks so much for the update and also for taking care of it so fast! Much appreciated!!
-
The plugin does not work after i have activated it!Why?
i am using wp 2.8!The latest version! -
And what does „not work“ mean exactly? And how do you expect to help you, when you do not provide additional information? (screenshot, installed & activated plugins, etc.)
-
I mean it does not show on screen at all.
-
j dalen, 9 юли, 2009:
Is it possible to leave the heading field blank so no title shows up on one of my pages? Right now if I leave it blank the default title for the page shows up, even though it says it is only optional.
Can I remove it completely?
Thanks in advance!
-
j dalen:
If you leave the Heading (optional) field empty, the default title will be printed. You cannot leave the default title field empty – you must have a title.
If you don’t want to show it in your blog, then you’ll need to remove the template tag from your theme files (the_title();)
-
Hello,
Have been using this plugin for a while and it’s great, however noticed an error today, if you have a & in the WP Title 2 what happens is the Wordpress title (used in the page navigation) takes the WP title 2 also!
Many hours of frustration haha, would be good to see if fixed in an update please
-
Will be fixed ASAP
-
Achim, 22 септември, 2009:
I would like to use your plugin to display a subtitle on my page. Let me give an example: The page title would be „Support“, the subtitle or heading would be „Drivers, Manuals and everything else you need“.
Your plugin would be great for this, especially since it supports qTranslate. However, I would have to change my template, so the title AND the subtitle are displayed.
Could you please tell me, how to call on the title and how to call on the subtitle/heading in the Loop?
-
Achim:
If I were you, I would simply use the formatting dropdown in my rich text editor when creating/editing the page and select „Heading 3″, „Heading 4″ and so on.
However, I will give you some code to do this the way you want. You should put this code in page.php where you wish your heading and subheading to appear:
<!-- here we print our title: -->
<h2><?php remove_filter('the_title','ct_the_title',999); the_title(); ?></h2>
<!-- and here comes the subheading: -->
<h3><?php add_filter('the_title','ct_the_title',999); the_title(); ?></h3>This should do the trick
John:
As I have to completely rework the way the input special characters are escaped, this means that a fix won’t be released soon. It will take time for thinking about it and testing. In the meantime, you shall try writing just an & for ampersand, not the HTML entity equivalent (&) . I reproduce your bug when I am writing & in the Heading field, but I do not reproduce it if I just type &. So you shall give it a try
-
This plugin is really excellent, and exactly what I need.
I need to use it with posts (we use a Recent Articles list of posts in a sidebar, so it makes sense). I’ve uncommented the two lines as described in previous comments, but I’m having two problems. One is the same formatting problem as shown in the „Team Nirvana“ comment above. (Here’s another link to their screenshot, same as mine would be: http://i39.tinypic.com/fualgp.jpg )
You emailed them a solution that seemed to work, and I’d love to get my hands on that.
Secondly, while the field is showing up in the editor (with the distortion shown above), the header isn’t being used in my recent posts list. (Maybe the two problems are linked and your emailed solution addresses both?)
Thanks!
Marshall -
In regards to the previous post, I should mention that the Recent_Posts widget class uses the following line to output each item in its list. Here’s screen shot of the line. It’s nothing special – just the default code – but it’s where it seems to me to be the most likely spot for customization to make this plugin work for me.
http://www.postmiracleparenting.com/recentpostcode.jpg
Would it simply be a matter of changing that line somehow?
Marshall
-
Marshall:
Here comes the solution. It is a ZIP file containing the 2 files that you just need to replace in the plugins/wp-title-2 directory.
As many people are asking me why have I stopped supporting Posts with WP-Title, in the next version I plan to return supporting Posts as well. Maybe it will be an option in the Options pages, having enable/disable option for using the plugin for Posts.
About your second question for „Recent_Posts widget“ – I will take care to make WP Title 2 working with this, but again this will happen in the new version
Thanks for the feedback!
-
That’s great news. Thanks for the files. The edit pages look fine now. I’ll really look forward to that next version!
(I know this is an annoying question, and I’d love to not ask, but I’m dying to know: Any idea on estimated timeframe for the new version?)
Thanks again,
Marshall -
I’ve already started working on it. I planed lots of improvements, some of them are already done. I expect to finish work on version 3.0 maybe at the end of the next week. After that some testing will be needed, but of course the development version will be available for download at WordPress’s website. Hope you’ll help with beta-testing
-
I’ll be more than happy to help with that.
Looking forward to it! -
How’s the coding coming?
-
Still there are few bugs that need to be fixed. Cannot say when I’ll be ready with version for testing , but I am working on it and I’ll write here when it’s ready.
-
Hi Folks,
I’ve released WP Title 2 3.0 beta 1 and it’s ready for testing! You can download it here.
There are a lot of features in the new version:
An options page is added. You shall find it in WP Admin -> Options -> WP Title 2. There you can set whether the plugin should work for both Posts and Pages or only for Pages, and you can enable/disable HTML in titles. Remember to properly encode special characters if you have HTML option enabled.
The plugin will be fully localized in the new version. Language files and POT catalogue can be found in wp-title-2/lang directory. Currently WP Title 2 is translated only in Bulgarian (my native language
), but it will be nice if I collect as many translations as possible before the official release of version 3.0. Hope you’ll help me with that as well
This article may be handful: Translating WordPress Plugins & Themes. If you have translated my plugin into your language, please write a comment and I will contact you how to send me the files.John:
I hope that the bug with the ampersand (&) is already fixed with that beta. If it doesn’t work, try enabling/disabling HTML in the Options page and see the result.Marshall:
As I mentioned above, plugin is finally working for Posts again! About the default recent posts widget, I couldn’t override it’s code to display the Post’s original title in the links, but with that version comes a new widget called WP Title 2 Recent Posts, which works exactly the same way as the default WP one, except that WP Title 2 Widget displays recent posts with their original titles – exactly what you wanted (I think)
-
This is fantastic. Thanks so much. The new widget is exactly what I needed. Thanks!
Marshall
-
Michael, 19 октомври, 2009:
Hi there, firstly, thanks for the fantastic plug-in!
Secondly, I am having some problem with the new beta version. When listing the pages on the menu bar using , it can only display the (long) title instead of the (short) heading that I have entered using WP Title 2. Please help!
Thank you so much!
-
Michael,
what function do you use for listing the Pages? Can you give me url so I can take a look? Screenshot? I’ll ask you to be more detailed
-
Version 3.0 is officially released! Available for download/upgrade on WordPress’s Plug-ins’ Page.
What’s new? – find in the Changelog.
I’ll be happy if you, folks, provide me with a translation of the plugin into your languages!
Have fun!
-
Barisko, 23 януари, 2010:
in combination with qTranslate, the heading field shows up UNDER the main text field in stead of above it.
could you please fix that?
-
Thanks for the warning. This issue was caused by the recent version of qTranslate.
There is a hot fix – update to 3.0.2.
-
Hello Programmer:
I have created a variable for each page called „title_tag“ and I have a value set for each page. However, I cannot get this value to show in my page tag.
Here is the code from my header.php for that tag:
Can you tell me how to change that code above to show the title_tag data. I can send you a Paypal payment. Thanks, Greg
-
What exactly is your „title_tag“ ? A php variable? A post_meta key? Please be more precise.
-
It is a field, stored in „WP Title 2″, the custom field I defined is title_tag in the wp_postmeta table. I want to show a custom meta title tag from it.
See full post here: (Add www)
experts-exchange.com/Web_Development/Blogs/Q_25100328.htmlThx Greg
-
Any answer on the above post? Greg
-
In order to show your string stored in WP Title 2, you will have to change your php code like this:
< ?php
if (is_home () )
{
bloginfo('name');
}
elseif ( is_category() )
{
single_cat_title();
if(get_bloginfo('name') != "")
echo ' - ' ; bloginfo('name');
}
elseif (is_single() )
{
single_post_title();
}
elseif (is_page() )
{
wp_title(': ',true);
}
else
{ wp_title('',true); }
?> -
YOU’RE THE MAN! Can I send you $20 through Paypal or some donate screen? Thx Greg
-
Don’t worry about that
I’m glad that I helped
-
Ryan, 2 февруари, 2010:
I love your plugin, thanks. One quick question. I’m wanting to make a small change so in the admin section under edit-pages, I can still show the original title. I’m looking to change wptitle2_the_title() function to check if its that admin page or not, but I’m struggling on the correct way to do that. Any ideas would be appreciated. This might be something that could be added as an option in future releases.
Thanks Again -
Hi Ryan.
Open wp-title-2.php and add the following code at the end of the file (before the closing ?> php tag):
if (is_admin())
{
remove_filter('the_title','wptitle2_the_title',999);
} -
veeco, 5 март, 2010:
Hi. Thanks for the great plugin. It’s not playing nice with the JH Portfolio plugin, even if I uncheck the box to not show on Posts. I get this error when I submit a JH portfolio item:
Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-title-2/wp-title-2.php on line 202
Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/wp-title-2/wp-title-2.php:202) in /wp-includes/pluggable.php on line 868
Any help appreciated!
-
Thank you for the feedback, there is a hot-fix, please update to 3.5.1

hi. Thanks for plugin
perfect.
Regards