If you’re like me and manage dozens of WordPress sites, you’ve probably got a shared code base which allows you to upgrade the WordPress filesystem easily.. But most likely you’ve also found it painful to have to visit each wp-admin individually and click the “Update WordPress Database” button. Ever wanted to script this task to run from the command line? Here you go 🙂
WordPress Development
WordPress Command Line Database Upgrade
September 22nd, 2012
Comments Off on WordPress Command Line Database Upgrade
WordPress: Assign custom CSS classes with the Visual Editor (TinyMCE)
April 23rd, 2011
6 Comments
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.
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: Specify a different version of jQuery with wp_enqueue_script()
April 20th, 2011
Comments Off on WordPress: Specify a different version of jQuery with wp_enqueue_script()
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
12 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.