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.
- 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.
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(); ?>
This plugin is released under the GPL.
This plugin is provided with absolutely no support or warranty.
- 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.
- June 10 2009 – v1.7
- Bug: Determine the correct wp-content directory.
- May 4 2010 – v1.8
- New feature: add ‘Steps’ mode (Thanks to Leo Brown!).
Updated 11 Sep 2008
Bug: use get_bloginfo(’wpurl’) instead of get_bloginfo(’url’) New feature: option to restore default display New feature: be able to use ems or percentages instead of pixels for the font-sizes New feature: widgetized version Bug: fix IE issues with class type elements
- New feature: add non-constant intervals
- New feature: add a <noscript> section for non-ActionScript-enabled browsers