Posts tagged as:

WordPress Development

Improve the speed of your blog, just like these running horses are faster because they bleached their hair.

These horses are somehow not cool. Speeding up your blog is.

I am working on a WordPress project that has a pretty heavy database, and I want to be able to auto-optimize the WordPress database. Even though they are integrating this functionality into WordPress 3.0, I want it now, and without having to use a plugin (I have had some issues with WP-DBManager configuring properly on a few sites).

If you add the following code to your functions.php file, it will automatically optimize your WordPress database every 6 hours, keeping it squeaky clean.

{ 0 comments }

Add a debt calculator to your WordPress blog

Do you have a financial blog or a blog about debt, money management, or household spending? Add a free debt calculator to your blog with no coding required.

  • Updating the style: You can update the form’s style by editing the plugin’s debt.css file
  • You can add the calculator to your website’s sidebar by using the shortcode in a text widget
  • Use in combination with the Show Content Only plugin as a pop-up window

{ 6 comments }

The Best WordPress SEO Plugin? A combination of two.

All in One SEO Pack (AIOSEO) is the leader in WordPress SEO plugins. It offers great functionality and simple integration into the process of writing a post. AIOSEO is not a perfect plugin, however, because it lacks some very important functionality:

  • Custom category title tags
  • Custom tag title tags
  • Mass editing of page, post, tag and category title tags/slugs

The plugin that has all of the features above (but lacks AIOSEO features) is SEO Title Tag, an imperfect but elegant solution to the list above.  This article shows how to use both plugins and have them combine forces to create a powerful solution for getting custom titles on all your site’s pages.

{ 3 comments }

Save Coding Time by Creating Special-Case Categories in WordPress

December 29, 2009
Thumbnail image for Save Coding Time by Creating Special-Case Categories in WordPress

When you would use excluded categories:

When using WordPress as more of a content management system (CMS) than a blogging platform, there are many things that you need control over. One of them is special-case categories.

  • Frequently asked questions
  • Testimonials
  • Case studies
  • Press releases

When you have a category of posts that you don’t want to have comments, publishing dates, post author, etc., you can define a list of excluded categories. In most cases, you should use Category Templates to achieve this functionality, but that is not always practical or the best option.

Read the full article →

Strip Extra ImageScaler Attribute from Plugin-Generated Code

October 2, 2009

I am using the ImageScaler plugin for WordPress on a project, and I like what it does, but it adds a non-standards-compliant attribute to images, such as:

<img class="" src="http://www.example.com/imagescaler/generated-image.jpg" alt="Example" width="258" height="234" imagescaler="http://www.example.com/imagescaler/original-image.jpg" />

To strip imagescaler’s imagescaler attribute, add the following into your functions.php file:

add_filter('the_content', 'strip_imagescaler');
function strip_imagescaler($content) {
	$content = preg_replace('/imagescaler="(.*?)".?/s','', $content);
	return $content;
}
Read the full article →

Simple Taxonomies Formatting — Improve the Plugin’s Code Output

August 13, 2009

Making the Simple Taxonomies WordPress Plugin Semantic

I’ve been using Joost de Valk’s Simple Taxonomies plugin for a couple of projects, and I’ve been very disappointed by the formatting of the terms output code.

When configuring the plugin, you have the option of choosing “Add terms to the end of posts” or “Add terms to the end of excerpts.” If you do, you get a <div> and a couple of spans. Not very semantic. Also, the code uses an #id, instead of a .class, meaning that if you have more than one post on a page with taxonomies, it no longer validates.

Simple Taxonomies uses terms, so let’s make a list of them!

Here’s a way to reformat the code and prevent overwriting in future plugin updates. We’re going to strip the code and use a definition list instead (<dl>). Definition lists in HTML have a term and description; just as a custom taxonomies creates a taxonomy and its terms.

Read the full article →

How to Display a Random Testimonial or Post in WordPress

August 12, 2009

Set up a testimonials category — no need for a plugin.

There are a couple of plugins designed specifically for testimonials, but I didn’t want to use them; they use their own databases, and don’t keep with WordPress’ simplicity. If possible, the best way to work with WordPress is to use it’s built-in functionality.

I also wanted to have the testimonials as a category in WP, rather than as a separate plugin. This code will work for any type of category, not just a testimonial.

Here’s how to create a random post item in your sidebar:

Read the full article →

Get Adjacent Images – More WordPress Functions

August 4, 2009

Get the adjacent photo, man.

WordPress, just get the adjacent image links. I’ll tell you what to do with them!

WordPress is normally great about providing functions that have a return and an echo version.  In WordPress, if a function has the prefix get_, then it does not echo (print it into the content), but rather returns the result so that it can be saved as a variable, like so:  $example = get_example();

There are some functions that only have echo capability, so I wanted to share my work-around with you all.

Updated image_link functions

  • adjacent_image_link() » get_adjacent_image_link()
  • previous_image_link() » get_previous_image_link()
  • next_image_link() » get_next_image_link()
Read the full article →

How to tell if your WordPress Plugin or Widget is Activated in WordPress

June 2, 2009

Check your plugin or widget activation & settings

Ever wonder if your widget or plugin is activated on an external site?

Here’s how to find out.

When you register a sidebar widget, you use code like this:

register_sidebar_widget(array('Name of Widget', 'class-of-widget'), 'widget_function');

If you want to check whether the widget is activated (you may want to for a variety of reasons), you can do it like this (the “class-of-widget” value from above will be used in the code below):

Read the full article →