WP-chgFontSize Wordpress plugin
Although users can change the font size of a web page through standard browser settings, few people knows or remembers how to do it.
WP-chgFontSize is a WordPress plugin that allows users to change dynamically the font size by adding a text or image selection on your blog. It also stores the user selection on their user’s browser cookies.
It can be used as a widget or directly as a PHP call in the theme.
See an example of how it works at the upper right side (header) of this blog.
Installation
- Download WP-chgFontSize.
- Decompress and upload the contents of the archive into /wp-content/plugins/.
- Activate the plugin on your WP Admin » Plugins page by clicking ‘Activate’ at the end of the ‘WP-chgFontSize’ row.
- Configure the plugin on your WP Admin » Options » Font Size page.
Usage
To use it, there are two possibilities:
- If your theme supports widgets, and you have installed the widget plugin or you are using Wordpress 2.2 or higher, add the ‘WP-chgFontSize’ widget on your WP Admin > Presentation > Widgets page.
- Add this code to the theme’s file where you want the font size selection appear, for example, on the sidebar.php file:
<?php chgfontsize_display_options(); ?>
License
This plugin is released under the GPL.
This plugin is provided with absolutely no support or warranty.
Version History
- March 8 2007 - v1.0
- Initial release to the public.
- August 1 2007 - v1.1
- Bug: use get_bloginfo(’wpurl’) instead of get_bloginfo(’url’).
- New feature: option to restore default font size.
- New feature: be able to specify min, max and interval values for the font size.
- New feature: be able to use pixels, ems and percentages units for the font size.
- September 6 2007 - v1.2
- Bug: first click on + size, it jump to GIANT font size.
- October 21 2007 - v1.3
- New feature: widgetized version.
- October 26 2007 - v1.4
- Bug: change js function names to avoid name duplications.
- February 5 2008 - v1.5
- Bug: allow class type div elements.
- April 23 2008 - v1.6
- Bug: fix IE issues with class type elements
To Do
Updated 23 Apr 2008
Bug: use get_bloginfo(’wpurl’) instead of get_bloginfo(’url’)New feature: option to restore default displayNew feature: be able to use ems or percentages instead of pixels for the font-sizesNew feature: widgetized versionBug: fix IE issues with class type elements- New feature: add non-constant intervals











158 Comments to “WP-chgFontSize Wordpress plugin”
Trackbacks/Pingbacks:
March 18th, 2007 at 2:57 pm
[...] ダウンロード:WP-chgFontSize Wordpress plugin [...]
March 19th, 2007 at 10:16 am
[...] WP-chgFontSize is a WordPress plugin that allows users to change dynamically the font size by adding a text or image selection on your blog. [...]
March 19th, 2007 at 12:44 pm
[...] just added another plugin: WP-chgFontSize. Found it in one of my daily chacks at the WP Plugins page. Intallation was easy, especially after [...]
March 19th, 2007 at 1:07 pm
[...] WP-chgFontSize erlaubt dem Benutzer, die Schriftgröße durch Text- oder Bildselektion dynamisch zu ändern. [...]
March 19th, 2007 at 2:10 pm
[...] chgFontSize,让访问者可以改变页面上字体的大小,对于中文用户有很大的实际意义,因为很多模版在FF/Opera这些浏览器下字体设定会显得过小。 上传激活。Options => Font Size page中作相关设定,在模版的合适位置(一般是sidebar部分)增加代码"<?php chgfontsize_display_options(); ?>"。 Tags: font, fontsize [...]
March 19th, 2007 at 2:35 pm
[...] More info & Download [...]
March 19th, 2007 at 3:50 pm
[...] chgFontSize,让访问者可以改变页面上字体的大小,对于中文用户有很大的实际意义,因为很多模版在Firefox/Opera这些浏览器下字体设定会显得过小。 [...]
March 19th, 2007 at 4:23 pm
[...] WP-chgFontSize Wordpress plugin » SDLC Blog [...]
March 19th, 2007 at 6:37 pm
[...] WP-chgFontSize es un plugin de WordPress que permite al usuario el cambio dinámico del tamaño de la letra , añadiendo una imagen o un texto de selección en tublog. [...]
March 20th, 2007 at 9:08 am
[...] to alter things to their taste. All hail then Ferran Rodenas, who has produced one of the most useful plug-ins in the WordPress canon, providing a shortcut to text resizing for those bloggers with neither time nor energy to [...]
March 20th, 2007 at 9:38 pm
[...] I added the WP-chgFontSize plugin, which is pretty cool. I wish it used ems or percentages instead of pixels for the [...]
March 20th, 2007 at 11:18 pm
[...] WP-chgFontSize Wordpress plugin WP-chgFontSize is a WordPress plugin that allows users to change dynamically the font size by adding a text or image selection on your blog. It also stores the user selection on a user’s browser cookie. (tags: wordpress plugin wp-plugins fonts typographie webdesign) Verwandte Einträge No Related Posts [...]
March 21st, 2007 at 1:32 am
[...] WP-chgFontSize Wordpress plugin » SDLC Blog - [...]
March 21st, 2007 at 2:49 am
[...] WP-chgFontSize Wordpress plugin » SDLC Blog (tags: wordpress plugin font plugins tool) [...]
March 28th, 2007 at 12:04 pm
[...] a list of plugins that will do just that: Wp-chgFontSize by rodenas. Demo [...]
March 31st, 2007 at 2:03 pm
[...] WP-chgFontSize Wordpress plugin » SDLC Blog Plugin de Wordpress para aumentar o disminuir el tamaño de la tipografia. (tags: wordpress plugin plugins font tool fonts typography) [...]
April 11th, 2007 at 5:27 am
[...] on the left, you will see that you can now change the font-size of the content of this blog. WP-chgfontsize is another great plugin which allows users to dynamically change the font size, very handy if you [...]
May 10th, 2007 at 11:21 am
[...] WP-chgFontSize Wordpress plugin Although users can change the font size of a web page through standard browser settings, few people knows or remembers how to do it. WP-chgFontSize is a WordPress plugin that allows users to change dynamically the font size by adding a text or image selec (tags: wp plugins cms) [...]
May 20th, 2007 at 9:58 am
[...] Visit [...]
June 26th, 2007 at 4:05 pm
[...] Give them the possibility to change the font size: wp-chfontsize Wordpress plugin. Many people don’t know or forget that they can do this from their browser. Why not making it [...]
July 12th, 2007 at 8:49 am
[...] WP-chgFontSize [...]
August 3rd, 2007 at 1:18 am
[...] Ferdy August 3rd, 2007 - 1:17 am Wordpress Average time to read 0:17 minutes I have updated the WP-chgFontSize Wordpress plugin to add some user [...]
August 24th, 2007 at 1:53 pm
[...] Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
August 25th, 2007 at 8:59 pm
[...] Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
August 27th, 2007 at 1:16 pm
[...] Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
September 6th, 2007 at 3:03 am
[...] Ferdy September 6th, 2007 - 3:03 am Wordpress Average time to read 0:08 minutes I have updated the WP-chgFontSize Wordpress plugin to fix a nasty [...]
September 29th, 2007 at 2:54 am
[...] the option to change the font size. I was very happy that the WordPress plugin author updated this nifty tool to work in the newest WordPress version for visitors who prefer to use larger [...]
October 21st, 2007 at 3:33 am
[...] WP-chgFontSize v1.3: [...]
November 24th, 2007 at 10:52 am
Meine verwendeten WP-Plugins…
Die letzten Arbeiten an meinem WP-Theme sind jetzt beendet. Deshalb möchte ich an dieser Stelle eine Liste von sehr guten und hilfreichen WP-Plugins vorstellen, die ich auf diesem Blog einsetze. Vielen Dank an alle Autoren für die gute Arbe…
December 8th, 2007 at 3:03 pm
[...] Besucher können Schriftgröße der Beiträge ändern WP-chgFontSize [...]
December 11th, 2007 at 1:55 am
[...] yang mau nambahin fungsi mengubah ukuran font kayak di header theme ini, bisa menggunakan plugin WP-chgFontSize atau plugin Change Font [...]
December 14th, 2007 at 3:12 am
[...] WP-chgFontSize Share and Enjoy: Share This Article [...]
December 18th, 2007 at 10:12 pm
[...] WP-chgFontSize [...]
December 31st, 2007 at 3:54 am
[...] I’ve searched for, found, and ta da!, added the “change font size” widget by Ferran Rodenas. [...]
January 17th, 2008 at 6:04 pm
[...] WP-chgFontSize -this allows users to change the font size dynamically , storing user selection in a cookie. “It can be used as a widget or directly as a PHP call in the theme.” [...]
January 22nd, 2008 at 1:07 pm
[...] Plugin Homepage [...]
January 26th, 2008 at 11:56 pm
[...] 204 WP-chgFontSize Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
February 20th, 2008 at 1:54 pm
[...] Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
March 20th, 2008 at 8:41 pm
[...] Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
May 30th, 2008 at 11:15 am
[...] [sito dell'autore] [...]
June 29th, 2008 at 4:40 pm
[...] WP-chgFontSize - Allows users to dynamically change the font size. [...]
August 15th, 2008 at 9:39 am
[...] 204 WP-chgFontSize Yazılarınızın boyutlarını küçültmeye veya büyültmeye imkan verir. Test&Link [...]
Comments:
March 20th, 2007 at 7:26 pm
Thank you.
March 22nd, 2007 at 11:39 am
I tested this plugin on one of my sites which has wp installed in a subdirectory, and it didn’t work at first. But then I changed line 142 ( function add_chgfontsize_js() ) to be get_bloginfo(’wpurl’) instead of get_bloginfo(’url’) and then it worked like it should.
- so you might consider changing that to add support for people who has their wp blog/ site set up just like me.
And thank you for making this plugin, it was just what I needed.
April 2nd, 2007 at 2:45 am
Good plugin, except that it only works with my posts, it does not work with my pages. Any ideas on how to fix that?
The theme I am using, should it matter, is - Andreas01-12.
Thanks in advance, hope you can shed some light on yhis problem
April 3rd, 2007 at 12:57 am
I have my WP blog set up in a subdirectory like Kristin, and tried installing the plugin both before I saw her tip, and after making her suggested adjustment, and neither time it has worked.
This is a plugin I *really* want for my readers. Any help would be appreciated!
April 4th, 2007 at 12:28 am
Eddie (19), the problem is within Andreas theme, it uses different DIV containers. Try using “post” DIV instead of “content”, although it will only change post’s font size.
April 4th, 2007 at 12:32 am
Dave (20), check the contents of the /wp-content/plugins/wp-chgfontsize/ directory. You must see 6 files. And remember that the subdirectory name (/plugins/wp-chgfontsize) is case sensitive.
April 7th, 2007 at 6:27 pm
I’ve just installed the plugin and it works fine, thank you Rodenas
have a nice Easter!
April 22nd, 2007 at 10:00 am
Unlike your blog, it only changes the size of the posts on mine. The sidebar remains the same size?
April 22nd, 2007 at 12:18 pm
Able-Mart, try using “wrap” instead of “content” as the DIV Base element.
May 29th, 2007 at 12:07 pm
Hi, for some reason its not showing up on my list of plugins, even though I’m pretty sure I uploaded it correctly. Any ideas? Thanks!
May 29th, 2007 at 12:09 pm
Oops! Sorry I’m a retard! It works now!
June 13th, 2007 at 2:50 pm
I love the idea of this plugin!
I’ve been using another javascript to achieve the same effect but a plugin is of course a much better option! Is there any potential release date for the widgetised version of the plugin please? Thanks!
June 14th, 2007 at 12:52 am
Mosey, my hope is to start working on the widgetised version in July.
July 11th, 2007 at 1:17 am
This is an update to comment #20 which I left in early April. After upgrading to WP versions 2.2.1, I tried this plugin again, and it installed perfectly.
July 20th, 2007 at 9:05 pm
Hi. A question and a sugestion. Making this a widget would make this plug-in one of the best ones. I wonder can the “code” be pasted in a text widegt and still function?
If anyone knows anything feel free to contact me, msn or email; aypeus@aypeus.org
Thx for creating this, your time reading this
Regards, Aypeus (Daniel)
July 22nd, 2007 at 10:52 pm
Daniel, I don’t know if pasting the code in a text widget will work. I suggest you to wait 2-3 weeks more, as actually I’m working in the widgetized version.
August 19th, 2007 at 4:05 am
It seems to be with just my installation, but I keep getting unsightly link borders around the images when I put it on my blog. Other blogs I’ve looked at who have this plugin installed DON’T have this problem, so I am not sure why this is happening. Does anyone by any chance has any suggestions? (I have removed the code from my sidebar in the meantime due to this issue. Not really sure if I can add a border=0 anywhere to fix it…
August 21st, 2007 at 11:41 pm
bev, just modify your css file and add something like this:
#chgfontsizeoptions a, #chgfontsizeoptions a:visited, #chgfontsizeoptions img {
border: none;
}
August 22nd, 2007 at 3:40 am
Thank you, Ferdy! I’ll go and add that to my CSS stylesheet now. Thanks for helping out
August 27th, 2007 at 9:46 pm
Hi Ferdy- Terrific plugin… installed fine and works effectively, but one question: The first time someone clicks the + size to enlarge, the font jumps to GIANT size, 24 point or something. Works normally after the first time. I’ve limited it to 14 pixels, but it still does the same. Any ideas? Thank you for your time, and a great plugin.
August 28th, 2007 at 1:25 am
Steve, I’m not able to reproduce the problem. Which OS + browser + version are you using?
In the meantime, I’ll do some tests with several configurations trying to reproduce it.
August 28th, 2007 at 2:52 am
Hi Ferdy- It happens with both IE6 and Firefox for me, which is strange. I’ll try it on some other computers and browsers. If you haven’t reproduced it, that’s good news. I’m using the Cutline theme and WP 2.1. Thanks for the reply and great plugin!
September 4th, 2007 at 6:22 am
Hi, I came with the same problem: with first click on A+ image, it jump to GIANT font size. but after the first click, it works fine. (I test it on FF2 and IE7,IE6 on Windows XP)
MY SITE: http://www.happysky.org
(It’s in Chinese but you can see the plugin on the top)
September 4th, 2007 at 7:21 am
OK, this is the solution:
Change the line 256 in wp-chgfontsize.php form
echo " chgfontsize_font_size = getCookie('wp-chgfontsize');\n";into
echo " chgfontsize_font_size = Number(getCookie('wp-chgfontsize'));\n";September 6th, 2007 at 2:52 am
Steve, the new version 1.2 solves your problem.
ppip, thanks for the solution. I just updated the pluggin to version 1.2 with the corrected code.
September 21st, 2007 at 6:36 pm
I’d like to get to be able to use the font size changer at the end of each wordpress post, (in addition to in my sidebar), and while I have php code execution enabled and working for each post, the images for the font size don’t display. Would this seem to be an issue with images inside posts rather than an issue with the font size php code? Thanks for any ideas?
September 23rd, 2007 at 7:06 pm
Thanks..
[…] Açıklamalı 232 Wordpress eklentisi (Agu. 15, 2007 !!) (Wordpress plugin list),[…]
October 2nd, 2007 at 11:52 am
Hi !
I’d love to use your plugin, as some people complain aout the font size of my blog but I don’t even manage to have the function appear…
I tried to put it in a text thing in a widget and it did not work. I later saw you mention that you are working on a widgetized version.
I tried to put it directly in posts but, again, it does not show up.
Where do I screw up ? Do I mention a wrong “div” ?
October 2nd, 2007 at 11:56 am
Seems I did not filled in all information (intervall, in particular). Now, it’s not showing in the sidebar, ok in the post, but not working yet. Probably my fault. I’ll work on it.
October 23rd, 2007 at 7:34 am
Whenever I click the image to change the font size, nothing happens.
October 23rd, 2007 at 6:41 pm
Erin, which is the URL of your site? Have you configured the plug-in at the Admin -> Options page? Be sure to specify the DIV container.
October 25th, 2007 at 10:42 pm
Yes I’ve done all that. It’s still not working. I included my url, just click my name.
October 26th, 2007 at 12:27 am
Erin, there was a conflict between two javascript function names. I’ve modified the chgfontsize plugin to avoid name duplications with other plugins. Download the new version 1.4 and don’t hesitate to contact me if you still have problems.
October 26th, 2007 at 6:48 am
It still isn’t working for me. I don’t know if it’s something I’m doing or what.
October 27th, 2007 at 11:14 am
I installed the plugin but obviously am missing font size background. My style sheet has defined as 62.5% so I put that as the default size - then picked 40 as min and 150 as max with 6 intervals. The pages showed up in tiny type and clicking on the display showing in the sidebar did nothing. I had to disable the plugin so the pages would be readable again. Please point me somewhere so I can learn how to set this up. Thanks.
October 28th, 2007 at 11:36 pm
Erin, sorry to say this, but I believe the plugin is not compatible with the theme you’re using. I have found lots of “content” DIVs on your main page, so the javascript function doesn’t know which one must change.
October 28th, 2007 at 11:41 pm
June, I have tested on my local machine the same configuration you pointed on your comment and it has worked for me. So I don’t know where is the problem. If you try it again, just drop me a line via the comment page and I’ll watch your site to figure out what is happening.
November 2nd, 2007 at 1:38 pm
hi, good plugin for the accessibility.
but the plugin doesn’t work in my website. how to configure it?
I have wordpress 2.3 and many themes widget ready
thanks for your help. i need your plugin for my readers
November 2nd, 2007 at 2:04 pm
Jéròme, at the wp-chgfontsize options page, change the DIV element value to “wrapper” or “content”. Hope this helps.
November 2nd, 2007 at 2:36 pm
Very thanks for you help. The problem is resolved.
Thanks for your speed answer. My frend who write with me on the blog have a low vision. your plugin give the blog easy readable for him.
thanks again.
November 6th, 2007 at 1:18 am
Hi Ferdy,
i have a new problem on my new blog: your plugin doesn’t appear, i have tried to slide the wpchgtfontsize widget in my widget leftbar but your widget is invisible! i have tried to delete and reinstall him but the problem is the same.
November 7th, 2007 at 12:49 am
Jérôme,
Check the contents of the /wp-content/plugins/wp-chgfontsize/ directory. You must see 6 files. And remember that the subdirectory name (/plugins/wp-chgfontsize) is case sensitive.
December 9th, 2007 at 8:24 pm
I keep getting the following error:
chgFontSize_getCookie is not defined
I’ve changed a couple of thing but I haven’t been able to fix it.
December 9th, 2007 at 8:25 pm
Oh.. I’m using the latest version. 1.4
December 9th, 2007 at 10:36 pm
Dario, which is the url for your site? I’ll check what’s happening.
December 10th, 2007 at 2:25 pm
http://www.natoura.com
December 10th, 2007 at 10:41 pm
Dario,
The problem resides in your wordpress header file, because the main javascript file is not loaded.
Check you header.php file to see if there is an statement that contains <?php wp_head(); ?>. If you don’t find this statement, add it at the end of the file.
Another option could be adding manually the next statement:
<script src=”http://www.natoura.com/natouraW/wp-content/plugins/wp-chgfontsize/wp-chgfontsize.js”> </script>
Hope this helps!
December 11th, 2007 at 1:33 am
Thanks a lot, I was able to figure it out, thanks to your help.
December 17th, 2007 at 7:41 pm
Hi Ferdy,
When you increase or decrease the text size it only seems to affect the ‘Posted in’ and not the actual post.
http://blog.yantotc.com/
Any ideas?
Thanks
Josh
December 17th, 2007 at 8:07 pm
Josh, at the Font size options page, change the DIV Base Element from “content” to “container” or “wrapper”.
December 17th, 2007 at 8:59 pm
Both container and wrapper still work like content (just resizes the ‘Posted in’… I viewed the source, and the text is within the wrapper, container and content tags…
Anymore ideas?
Thanks
Josh
December 18th, 2007 at 2:15 am
Josh, the problem is that the .entry and .post h2 classes, among others, specifies the font size in pixels, so they override the font size of the content, container and wrapper classes.
The only solution I see is not specifying the font size in pixels in these “low level” CSS classes. I suggest you to use percentages instead. If not, I’m sorry, but this pluggin will not work for you.
December 20th, 2007 at 4:32 pm
I removed the font size tags from those classes and it works!
Thanks for your help Ferdy!
December 22nd, 2007 at 12:23 am
Hi, I hate to be a bother…I seem to have the same question as a lot of others, but I’ve not been able to make their solutions work. Clicking on the icons (I’m not using the text) just doesn’t do anything. I’ve tested with Firefox and IE7. I believe “content” is the correct DIV tag to use, and it doesn’t appear multiple times on the site. I’ve removed any references in my CSS to font sizes according to pixels or em. In the config panel, I’ve tested it in ems, pixels, and percentage with no effect, small intervals, huge intervals, etc. I know that the plugin, consisting of 4 gif files, 1 javascript, and 1 php file, are in the right directory (all lowercase: …/wp-content/plugins/wp-chgfontize). I’m really at a loss, and hope that it’s something small I’m missing, as opposed to something wrong with my theme.
January 6th, 2008 at 8:01 pm
Hello: great pugin and very thanks for do it. I tried to install on a wordpress theme in a Intranet. This plugin it’s very important for my readers. I have been many troubles trying the installation
(only works on the side bar), but finally I find the DIV tag : “main” in more themes works very well
Very thanks Ferdy
(I beg your pardon for my english)
January 10th, 2008 at 8:29 pm
Where in my single post php file do I add the code for this plugin if I want it to appear in the upper right hand corner of each post? I’ve tried it in several places, but it ends up right next to the author name… I wouldn’t mind if it was on the same line, just aligned right. Please help.
Katie
January 12th, 2008 at 11:43 pm
Caroline, at the wp-chgfontsize options page, change the DIV element value to “center”, the min font size to 80, the max font size to 120, and the default font size to 100. Hope this helps.
January 12th, 2008 at 11:44 pm
Katie, I need to check the single php file. Please, send me this file.
January 31st, 2008 at 9:36 pm
I’m using the same theme as used on this weblog, or so it appears. Latest version of WP running, but however I do have some other plugins up. I deactivated them all, but still wp-chgfontsize is not working. I’m using the widgetized version. Subfolder has correct name, 6 files. What is the div you are using because I cannot seem to figure out which one i need (currently I have entered page, but I already tried sidebar and content). The plugin just does not show up (the widget). What am I doing wrong? Thx!
February 1st, 2008 at 12:43 am
Morgan, your div is correct, but seems that you didn’t specify the min, max, interval and the default font size at the pluggin options panels. Check the values and try again.
February 2nd, 2008 at 1:06 am
All I see in my widget box is “?a-??A+?
February 2nd, 2008 at 11:20 am
Sally, change the DIV element from “left” to “page” or “center-widget”.
Also, there is a bug in this version of the plugin and it only works with DIVs that are ID elements. So, in order to work properly with your theme, change your DIV element (instead of using div class=”page”, you must use div id=”page”). Or wait until I release a new version of the plugin (hope it will be next week).
February 13th, 2008 at 5:29 am
This doesn’t work on my IE7, but it does work in Firefox and Opera. Have you any idea what can cause this and if there is a solution?
February 17th, 2008 at 10:19 am
first I’m impressed with the effort you put in this awesome plugin… thanks
I hope you can help me sort out my problem; the plugin used to work like a charm on many themes which I used but on this one http://www.fulham.pl it distorts the layout (sidebar); I wonder why is this happening and how can I correct this; div is content (tried wrap, wrapper and nothing happens); ty in advance
February 20th, 2008 at 9:49 pm
Non-Constant Intervals:
Instead of setting min, max and interval, can I list my desired font sizes: 11, 12, 13, 15, 19, 23?
March 14th, 2008 at 5:23 pm
I can’t seem to get this to work in ie7 either, it works fine in Firefox 2. The drop down box works, the default button works, but no changes to the font size in the posts work in IE.
April 1st, 2008 at 9:14 pm
Hello, This plugin works great for Wordpress 2.5. I’m wondering if you want to release the the bare bones code (with comments to be able to select the default font size and other options) for use on a site that is not based on WordPress? I’d like to use it on other sites, and have found that other font resizers just don’t work that well )and don’t have a default size control, either.) - Thanks, Mark
April 16th, 2008 at 6:52 am
Thanks a ton. I was looking for this for quite sometime!
April 16th, 2008 at 11:44 pm
I too am experiencing functionality issues with IE.
Tested with (Windows XP OS):
Opera 8.5x and 9.2x - both work great.
Firefox 1.5 and 2.x - both work great.
Safari 3.x - works great.
IE 5.5, 6.x and 7.x - none work at all.
I’ve tried all variations of available options (div element, units, display, etc.) with no success.
I love the idea behind this plugin and appreciate the efforts of the author and would love to be able to offer to my visitors, but am afraid that it will cause too much confusion amongst the users of the most popular browsers (IE).
Thanks, I would greatly appreciate any feedback as to a workaround or fix.
April 17th, 2008 at 12:25 am
PNOOZ, I’ve tested the plugin with IE (all versions) and works well in some sites (for example, in this blog) and doesn’t do anything in others. Actually, I don’t have a fix for this issue, I need to investigate what’s wrong.
April 17th, 2008 at 12:40 am
songdogtech, the code is released under the GPL. So you can modify it if you want. But if you just need to use it without any modification, you can download the code, and upload the wp-chgfontsize directory to your site. Then add the following code to your pages:
<script type="text/javascript" src="http://your site URL/wp-chgfontsize/wp-chgfontsize.js”>
<!–
chgfontsize_element = ‘page’;
chgfontsize_min_font_size = 80;
chgfontsize_max_font_size = 120;
chgfontsize_interval_font_size = 5;
chgfontsize_units_font_size = ‘%’;
chgfontsize_default_font_size = 100;
chgfontsize_units = chgFontSize_getCookie(’wp-chgfontsize-units’);
if (chgfontsize_units != chgfontsize_units_font_size) {
chgfontsize_font_size = chgfontsize_default_font_size;
} else {
chgfontsize_font_size = Number(chgFontSize_getCookie(’wp-chgfontsize’));
if (chgfontsize_font_size == null) { chgfontsize_font_size = chgfontsize_default_font_size; }
}
chgfontsize_imgdecact = new Image();
chgfontsize_imgdecact.src = ‘http://your site URL/wp-chgfontsize/decrease_activated.gif’;
chgfontsize_imgdecdea = new Image();
chgfontsize_imgdecdea.src = ‘http://your site URL/wp-chgfontsize/decrease_deactivated.gif’;
chgfontsize_imgincact = new Image();
chgfontsize_imgincact.src = ‘http://your site URL/wp-chgfontsize/increase_activated.gif’;
chgfontsize_imgincdea = new Image();
chgfontsize_imgincdea.src = ‘http://your site URL/wp-chgfontsize/increase_deactivated.gif’;
chgFontSize_display(display_text (on / off), display_image (on / off), display_restore on / off));
chgFontSize();
//–>
April 17th, 2008 at 12:47 am
Jonathon, added Non-Constant Intervals as a to-do feature.
April 17th, 2008 at 2:08 pm
Sorry, I meant to add that I have discovered that if I leave the “DIV Base Element” field empty or blank that is has the opposite effect that I described in my previous post - the plugin will work with IE but not the others. Just thought that I would pass along in hopes that it will help someone figure out what’s going on.
Thanks again, Ferdy.
April 17th, 2008 at 2:46 pm
Sorry again, but I just made another discovery. I viewed your source and then mine and tried the following which worked:
I added the “id” element to my div tage and it now works in all browsers. Have successfully tested in IE 7, FF 2, Opera 9 and Safari 3.
I did have to tweak a few style sheet elements due to alignment issues, but I’m sure that this will vary by theme.
Hope this helps.
April 17th, 2008 at 2:53 pm
The tag was stripped from my last post it was:
If it gets stripped again, it’s the following less the angle brackets:
div class=”entry” id=”content”
April 17th, 2008 at 7:05 pm
Have now had more time to evaluate in all of the browsers available to me and found that my last post was a little premature. After testing in IE 5.5 and 6 I found major alignment problems. I edited once again to the following:
div class=”entry” id=”entry” and set the matching “Font Size” plugin “DIV Base Element” option to “entry”. I have since successfully tested in all browsers.
The “entry” class element in my stylesheet is the one that governs just the post and only the post. I only wanted to give the option to my visitors to resize the text of those posts. So, setup as I have, all functions well as desired.
The ‘div class=”entry” id=”entry”‘ tag referenced is found on my “main index template” under “presentation > theme editor” in my WP admin panel.
Apologies again for so many posts, just trying to be helpful. If it were possible to edit posts, I would have done so.
Thanks again for your excellent work!
April 23rd, 2008 at 1:04 am
PNOOZ, I’ve discovered what causes the bad behaviour in IE. Upgrade to version 1.6 and it’ll work well (I hope!).
April 23rd, 2008 at 6:48 am
How do I specify multiple DIV classes?
April 23rd, 2008 at 10:51 pm
Prasannah, you can’t specify multiple DIV classes.
April 24th, 2008 at 5:33 am
Re: comment 5306
Thanks for the bare font size changer code - I will use it on a static non-WP site where I don’t need all the extra functions of jquery or prototype. - Mark
April 24th, 2008 at 4:08 pm
:-(. I would really like to have this feature (maybe in your next version) as it makes sense to also change the font-size of the sidebar content and comments!
April 26th, 2008 at 5:41 am
Thank you for this great plugin. It’s tough to make a site everyone can enjoy, and this helps tremendously.
May 7th, 2008 at 2:37 am
Is there a simple way to have the font size automatically reset to default on page refresh or click through to a new page? I find that with all of my various browsers when I set the font size larger or smaller, it doesn’t “stick” and the plugin will reflect one value when it is actually default. I hope that this makes sense, if not please click over to my site and give it a try and I believe that (hopefully) you’ll see what I mean.
Thanks
May 8th, 2008 at 4:25 pm
I’m having trouble getting the plugin to work properly. I’ve set all the settings, but it only changes the size of the titles, byline, and links, not the main text of the posts. There is only one main_content_shortened div (which is the div base element).
Thanks,
Matt
May 9th, 2008 at 12:24 am
Matt,
Add these lines to your CSS files and it’ll work:
.MsoNormal {
font-size: 1em;
}
May 9th, 2008 at 5:41 pm
Excellent. It works now.
May 23rd, 2008 at 4:43 pm
Hi. I can’t get this to work on WPMU 1.5.1 - Any suggestions? Also any plans for multiple divs in the near future? Thanks!
May 27th, 2008 at 12:07 am
jn,
- Which error are you seeing in your WPMU installation?
- There aren’t any short-term plans to support multiple divs
May 29th, 2008 at 6:33 pm
This is just the plugin I’ve been looking for. I assume I have done something wrong and that is why the widget plugin is not working on my site. I could use advice about how to get it to work. Thanks for your help and for not assuming I’ll know where to place the correct code if that’s what’s needed — I am new to using css.
May 29th, 2008 at 10:44 pm
It works now. I just needed to set it to posts instead of content, and it works for posts and pages. Sorry to bother you. Thanks for the plugin.
June 11th, 2008 at 9:30 am
Hi, thanks for sharing this plugin. I have decompressed and uploaded it into /wp-content/plugins/ but I can’t see the plugin in the WP-Admin > Plugins page. Any idea what is the cause of this problem or anywhere that I need to check on?
June 11th, 2008 at 10:59 am
I have a strange problem… I’ve been looking at the code for ages and can’t seem to see where it’s coming from. underneath where I have implemented the plugin, there are 3 extra links: A, A, and A… each with the titles decrease font size, default font size, and increase font size, respectively. They each appear on a new line directly below the images. Any ideas? thanks.
June 13th, 2008 at 12:12 am
Lawrence, check the contents of the /wp-content/plugins/wp-chgfontsize/ directory. There must be 6 files. And remember that the subdirectory name (/plugins/wp-chgfontsize) is case sensitive.
June 13th, 2008 at 12:13 am
Darryl, after checking your site, seems to me that the plugin is working as expected now. Let me know if the problem persists.
June 24th, 2008 at 8:39 pm
Hi there,
Know anyone which plugin to use if I want only the first part (first paragraph) of the article to be displayed? If someone want to read more there will be a “read more” link…
On my blog right now is displayed all of article content and I don’t want this…
I’m talking about the latest 10 articles displayed on the first page of my blog.
I’m using Wordpress.
Can anyone help?
July 6th, 2008 at 11:15 pm
Thank you for this handy plugin!
I’ve spent some time today customizing the output a little bit. Not that the plugin would need any improvement, but a certain project I’m working on does require some visual changes here and there. So I added an image for the “default font-size” option and coded its usage into the files. I also customized the link title-attributes, planning localization for the whole plugin in the near future.
If you’re interested in taking a look at the code now, please send me an email and I’ll be happy to email a ZIP back.
There’s no way to see the customization in action, unfortunately, for the project site is under construction pw-protected.
Keep it on!
Caspar
July 7th, 2008 at 10:34 am
Update:
Issue in IE 6 on Win XP SP2
Plugin settings:
Restored to the original, non-customized 1.6. version
Images = activated, Restore to default = activated, DIV Base element = page
Description:
After one click on the “A+”-image both of the images (”A+” and “a-”) disappear.
The wrapping links stay functional, though, will say: I can click on the empty links and the script itself keeps working fine. I can also see the “Default” text-link. Just the images are gone and won’t re-appear unless the whole page is refreshed.
Attempts:
None so far. I have no idea what’s happening except it might have to do with the image paths being corrupted in IE?
Thank you for ANY ideas!
July 8th, 2008 at 1:10 am
Caspar, it’s very difficult to analyze what’s happening without being able to see the plugin in action.
Have you tried other browsers, like FF, Safari or even IE 7? Did you see the same strange behavior using those browsers?
One suggestion, check the html code generated, and look for the chgfontsizeimginc or chgfontsizeimgdec id’s. These are the vars where the images are stored. If you can save the html page, send it to me and I’ll try to analyze what’s happening.
July 8th, 2008 at 6:31 pm
Ferdy, thanks for your reply. I’ve switched to the drop-down option meanwhile and will keep working with it until this project is done.
Nevertheless, I’ll keep your hint in mind and will look at the image option again afterwards. Whatever I’ll find, I’ll let you know.
Thanks again!
July 23rd, 2008 at 2:17 am
Ferdy,
Thanks for the code listing way back in April; I’m trying to get the font size changer to work in a non-Wordpress site. I have the js link data you posted in my pages and wp-chgfontsize directory in place. Now I get this error in my test index page
Call to undefined function: get_option() in wp-chgfontsize.php on the line that begins $chgfontsize_div_element = get_option(’chgfontsize_div_element’);
Seems like wp-chgfontsize.php isn’t able to read the options that used to be in the database and now are in the page header?
Thanks for any help, Mark
July 23rd, 2008 at 11:29 pm
Hi,
I install WP-chgFontSize 1.6 in plugins.
I filled some Font Size options
DIV Base Element, as entry, since other words doesn’t regognize.
But the changes in my site just only in paragraphs’ lines intervals.
I have no changes in font size.
What can I do?
July 24th, 2008 at 12:53 am
songdogtech, it seems that you’re invoking the wp-chgfontsize.php file. You can’t do that, because it only runs under a wordpress installation (unless you’ve modified it). In order to use the font size functions, you don’t need the php file. Just link the js file on your pages and use the javascript code I wrote in my earlier comment.
July 24th, 2008 at 12:56 am
Adam, it could be that the DIV element specified is incorrect or the CSS file overrides some font size options. If you provide me your blog URL (as a comment on this post or using the contact form), I could check your site and tell you what’s wrong.
July 24th, 2008 at 6:05 am
Ferdy, Hmmm….. Reason I tried linking the php file is that I thought I needed to call in the body of the page in order to display the increase/decrease images.
I’ve tried the js in the head and the body of the page but no luck. My