Using Normal Quotes Instead of Curly Quotes : Wordpress

November 4th, 2009

The problem. If you’re a developer who often publishes code snippets on your website, you have probably encountered the following problem: a user tells you that the code you posted doesn’t work. Why? Simply because, by default, WordPress turns normal quotes into so-called “smart quotes,” which breaks code snippets.

Read More >>



Automatically Get Images on Post Content

November 4th, 2009

The problem. Using custom fields to display images associated with your post is definitely a great idea, but many WordPress users would like a solution for retrieving images embedded in the post’s content itself.
The solution. As far as we know, there’s no plug-in to do that. Happily, the following loop will do the job: it [...]

Read More >>



Only Show Posts With a Specific Custom Field

November 3rd, 2009

Sometimes you only want to show posts that you’ve added a specific custom field to. A typical post loop begins like this:

Read More >>



Display Latest Posts by Category Archive

November 3rd, 2009

This tutorial will help you build a ‘Latest Posts by Category Archive‘ easily, this can be used to set up custom blog homepages, 404 pages, landing pages or even a special archive page. If you are looking for a plugin to generate such an archive, please check out: WP Plugin: Latest Posts by Category Archive.

Read More >>



How to Highlight Search Terms with jQuery : Wordpress Tricks

November 3rd, 2009

Spice up your WordPress search page by highlighting search terms within your search results. The solution described in this tutorial will highlight both the title and post content and is a drop-in modification for WordPress.

Read More >>



Get the First Image from the Post Automatically and Display it

November 3rd, 2009

Most WordPress users including me are using custom fields to display thumbs on their blog homepage but i recently stumbled across a simple php function that allows you to grab the first image from the post automatically, and display it on your home page without the need to add any custom field to the post.

Read More >>



How to Disable Scripts And Styles : Wordpress Hack

November 3rd, 2009

Many plugins and themes add JavaScript and CSS files to your site. While this alone isn’t necessarily a bad thing, using several plugins that do this can bog down your site with loads of requests for these files.
In this tutorial Justin Tadlock describes a smart solution to disable scripts and styles of your plugins by [...]

Read More >>



Create A Loop Of Images In Wordpress

November 2nd, 2009

The problem.
Nowadays, most blogs display post excerpts on the home page along with an image. How about being even more original and providing readers with a nice “gallery” page, listing however many of your recent posts, and displaying each post’s lead image? Of course, we can easily achieve this with custom fields; but believe it [...]

Read More >>



Get Only The Latest Sticky Posts : Wordpress Hack

November 2nd, 2009

The problem.
Introduced in WordPress 2.7, sticky posts are a very cool feature of our favorite blogging platform. A lot of WordPress users ask how to get only sticky posts in the loop.
The solution.
To display your five most recent sticky posts, just paste the following code anywhere in your theme files. If you want to display [...]

Read More >>



Create Your Own WordPress Loops Using The WP_Query Object

November 2nd, 2009

The problem.
The classic WordPress loop, which is used in most hacks in this post, is both useful and user-friendly. However, particularly when using a lot of custom loops (for example, in complex “magazine” layouts), you risk problems with resetting, offsetting, invalid conditional tags and other annoyances.

Read More >>