Posts: 37
Threads: 5
Joined: Mar 2011
2011-10-23, 20:33:37
(This post was last modified: 2019-05-11, 06:22:51 by ePirat.
Edit Reason: New release 1.5
)
Hello,
Due to a request I've created a custom title plugin.
This plugin allows you to change the default title tag, you can use the following variables: %sitename% Name of the website (as defined in GetSimple setup) %pagetitle% Title of the current page (as defined in the editor - the one display in the page body) %parenttitle% Title of the parent's page %menutitle% Title of the current page's menu item (if it has one)
You can also define custom title tags for a specific page (overriding the site default) in the editor options -> Custom title tag (empty for default)
Usage:
Go to the Plugins page, then click on the Custom Title Settings Link. Here you can set a sitewide title (default) which is used when no specific title is set for a page.
To define a title tag for a specific page, go to the Page overview, then open the More Options menu and change the Custom title tag (empty for default).
You can use the following variables:
%sitename% Name of the website (as defined in GetSimple setup)
%pagetitle% Title of the current page (as defined in the editor - the one display in the page body)
%parenttitle% Title of the parent's page
%menutitle% Title of the current page's menu item (if it has one)
Changelog:
Version 1.5 - Fix typo in <label> tag (thanks Carlos for reporting that)
Version 1.4 - Rewrote nearly the entire plugin
- Fixed various issues with escaping and quotes
- Fixed issues with modifications of the $_POST variable
Version 1.3 - Fixed bud which allowed html code in title tag, which could cause unexpected behavior
- Fixed issue which escaped quotes with a lot of backslashes on systems where magic_quotes are enabled
- Added support for special characters
Version 1.2 - Fixed styling issue with the custom title input form in page settings
- Fixed issue in the options page of the plugin
Version 1.1 - Fixed that you couldn't set custom title for any page
Version 1.0
Detailed installation instructions you can find on the plugin page:
Plugin Link – Download
Posts: 2,928
Threads: 195
Joined: Feb 2011
this looks very promising!
the link: http://get-simple.info/extend/plugin/custom-title/240/
I will certainly use it!
Posts: 65
Threads: 7
Joined: Apr 2010
Posts: 3,491
Threads: 106
Joined: Mar 2010
Essential plugin for those concerned about SEO.
Useful even if you e.g. only want to customize (and easily change) your index page's title tag.
Thanks for making it real ;-)
Posts: 1,848
Threads: 86
Joined: Aug 2009
great idea for a plugin... I've been using the i18n custom fields plugin for this - but this is more featured and geared towards the problem of SEO. Great work on it!
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 3,491
Threads: 106
Joined: Mar 2010
@ccagle8
Heh, when I suggested someone created this plugin you said you'd use it if it existed... };-)
Posts: 1,848
Threads: 86
Joined: Aug 2009
haha, I didn't even remember that post... but it still holds true!
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1
Threads: 0
Joined: Dec 2011
How do I add a title change to "News Manager" - every post has a title as the default home page.
Posts: 3,491
Threads: 106
Joined: Mar 2010
@dirtydancing
This does not belong to this thread's topic, but... have a look at this post in News Manager's support thread:
http://get-simple.info/forum/post/15133/#p15133
Posts: 23
Threads: 3
Joined: Nov 2011
Thank you ePirat! Exactly what I needed when I realised that I could not easily write my own <title> tag different to navigation title.
I vote for this being included in the base code. It's essential, not optional IMHO.
Posts: 11
Threads: 4
Joined: Feb 2011
2012-07-15, 21:20:01
(This post was last modified: 2012-07-15, 21:22:18 by rhianllanes75.)
Does this plug in have anyway of rendering the html? I tried to put a link in the title and it printed out the "a" element tag instead of the link.
If you can tell me where in the source to look, I will try and make the change and share it.
Posts: 2,928
Threads: 195
Joined: Feb 2011
totbar Wrote:Does this plug in have anyway of rendering the html? I tried to put a link in the title and it printed out the "a" element tag instead of the link.
If you can tell me where in the source to look, I will try and make the change and share it.
There is no sense in using HTML in a web page title at all. A title is something which is shown in the titlebar of the browser, a link there is absolutely nonsense ;=)
why would you do this? To break the visitor's browser session?;=)
Cheers, Connie
Posts: 11
Threads: 4
Joined: Feb 2011
2012-07-16, 05:39:14
(This post was last modified: 2012-07-16, 05:42:15 by rhianllanes75.)
Oh, I should have mentioned: In my template files, I replaced <h1><?php get_page_title(); ?></h1> with <h1><?php echo(get_custom_title_tag()); ?></h1>. I left the title tag in the site header alone.
I did that so I could keep the pages named correctly in the admin pages tab and still use a customized page title on individual pages. When I read the plugin description initially, I thought it was supposed to be for the use I gave it. Then I noticed the problem rendering the HTML and read a little bit more. That's when I discovered it was intended for the title tag, and not so much page titles.
Posts: 2,928
Threads: 195
Joined: Feb 2011
yes, it might be confusing sometimes
I am glad it works for you now, and you can continue to dive into GetSimple!
Cheers, Connie
Posts: 37
Threads: 5
Joined: Mar 2011
There are some use cases where you might want html in the title tag, e.g. to use · and stuff like this…
If you really want to, you can use:
Code: <?php echo(htmlspecialchars_decode(get_custom_title_tag())); ?>
(but I do not recommend using it, unless you know what you're doing…
Posts: 6
Threads: 0
Joined: Jun 2012
I am using gs blog ( a slightly older version)
Default meta titles don't work so I was hoping this would help but it doesn't work on the blog pages.
OS there any quick way to add this to gs blog ?
thanks for any guidance
Posts: 687
Threads: 63
Joined: Nov 2011
(2012-12-15, 05:14:39)lr Wrote: I am using gs blog ( a slightly older version)
Default meta titles don't work so I was hoping this would help but it doesn't work on the blog pages.
OS there any quick way to add this to gs blog ?
thanks for any guidance
Is there any particular reason you are still running an old version? We always recommend updating GS and plugins, to the latest stable release version.
Posts: 37
Threads: 5
Joined: Mar 2011
Ok it seems there are issues with this plugin and the latest GS Version, I'll check this and update the plugin. Sorry for any inconvenience.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Do you know what the issue is?
Posts: 23
Threads: 3
Joined: Nov 2011
Hi. Any progress with this please? Or does anyone have suggestions what to hack to get it working? Thanks.
Posts: 23
Threads: 3
Joined: Nov 2011
I guess this plugin is abandoned. Can anyone suggest an alternative for setting custom titles?
Posts: 1,127
Threads: 136
Joined: Feb 2012
The plugin continues to work for me in GS3.2
If you want an alternative system for custom html titles you can use a component to write whatever you want in the title tags of your template. if you want different titles for different pages you can follow these instructions from Carlos which I put in the wiki for different components in different pages.
http://get-simple.info/wiki/components-d...rent_pages
I have tried it and it works. It isn't hard to do and it can't fail.
Posts: 1,204
Threads: 30
Joined: Jun 2010
2013-04-24, 22:18:41
(This post was last modified: 2013-04-24, 22:19:49 by yojoe.)
(2013-04-24, 21:07:06)Divita Wrote: I guess this plugin is abandoned. Can anyone suggest an alternative for setting custom titles?
One of available customfields plugin will solve your problem.
Just create a new custom text field, call its content inside template's <title> tag, and voilla.
Addons: blue business theme, Online Visitors, Notepad
Posts: 37
Threads: 5
Joined: Mar 2011
I've looke into it and couldn't find any issue… If you are still experiencing problems I need futher details to reproduce the problem.
Sorry for the late reply, for some reason I did not received E-Mail notifications for this topic anymore…
Posts: 206
Threads: 7
Joined: Mar 2013
2014-01-30, 07:30:24
(This post was last modified: 2014-01-30, 07:34:08 by TeeJay.)
Works like a charm, exactly the function that I wanted. The only trouble for me is that it doesn't use a return function so I have to use echo, but that's not a big deal thank you for this plugin.
Edit:// One more thing you could make better. Put one more field into the backend plugin's settings which would be your custom string for the "Custom page title:" text. I had to hardcode my translated string into the plugin's file. Not a big issue, just a suggestion what you could make even better
|