As a WordPress theme developer, it’s very useful to be able to define CSS classes in a theme’s stylesheet, then allow them to be assigned to elements by the user with the Visual editor. Classic examples would be special classes to style links, lists and images.
WordPress Development
WordPress: Specify a different version of jQuery with wp_enqueue_script()
April 20th, 2011
No Comments
I find using the wp_enqueue_script function a nice tidy way to include javascript files in my theme. Especially when using scripts that come bundled with WordPress, such as jQuery, script.aculo.us, etc. However I recently had an issue with the very cool Fancybox jQuery plugin not playing nice with the version of jQuery that shipped with WordPress. Here’s the solution.
I find using the wp_enqueue_script function a nice tidy way to include javascript files in my theme. Especially when using scripts that come bundled with WordPress, such as jQuery, script.aculo.us, etc. However I recently had an issue with the very cool Fancybox jQuery plugin not playing nice with the version of jQuery that shipped with WordPress. Here’s the solution.
WordPress Function: is_page_or_descendant()
November 4th, 2010
2 Comments
Here’s a handy little function to check if the page you’re currently viewing is a specific page or a descendant of it (child, grandchild, etc). I’ve come across a few simliar functions: is_child(), is_subpage(), is_descendant(), etc; but none that met my needs exactly.
Here’s a handy little function to check if the page you’re currently viewing is a specific page or a descendant of it (child, grandchild, etc). I’ve come across a few simliar functions: is_child(), is_subpage(), is_descendant(), etc; but none that met my needs exactly.
WordPress: Add the <hr> button to the Visual Editor (TinyMCE)
October 18th, 2010
9 Comments
Strangely, the <hr> tag (horizontal rule) button isn’t enabled by default in the WordPress Visual Editor (TinyMCE). Here’s how to turn it on, along with any other buttons you want to use.
Strangely, the <hr> tag (horizontal rule) button isn’t enabled by default in the WordPress Visual Editor (TinyMCE). Here’s how to turn it on, along with any other buttons you want to use.
WordPress Security Tip: Remove Generator Meta Tag (wp_generator)
March 25th, 2010
1 Comment
Sometimes when a security hole is found in WordPress, the cyber-baddies will target specific versions of WordPress that are vulnerable to the exploit. There’s no easier way for them to see which version a site is running, than by looking for the “generator” meta tag, which is added by the wp_head() function.
Sometimes when a security hole is found in WordPress, the cyber-baddies will target specific versions of WordPress that are vulnerable to the exploit. There’s no easier way for them to see which version a site is running, than by looking for the “generator” meta tag, which is added by the wp_head() function.






