Archive

Archive for the ‘CMS & Forums’ Category

Display Content Only To Registered Users : Wordpress

November 5th, 2009

The problem.
As you probably know, WordPress lets you decide whether to allow readers to create accounts and sign in to your blog. If you want to increase your blog’s registered readers or would just like to reward existing readers, why not keep some content private, just for them?

Read More >>



WordPress Coding Techniques : Style Posts Individually

November 5th, 2009

The problem.
Your blog has a lot of posts, but the posts aren’t all of the same type. To give special styling to one or more of your posts, you can take advantage of both the post_class() function and the post ID.
The solution.
To apply this trick, just open your single.php file, find the loop and replace [...]

Read More >>



Restore Your WordPress Database

November 5th, 2009

The problem. Let’s say, for some reason, such as a hacking or upgrade problem, you have lost your blog data or it has become corrupted. If you have a backup (and I hope you do!) you will have to import it to your WordPress database.

Read More >>



Batch Delete Post Revisions Wordpress

November 5th, 2009

The problem. Post revisions, a new WordPress 2.6 feature, can be very useful, but they also increase the size of your MySQL database. Sure, you can manually delete posts revisions, but that’s very long and boring work.
The solution. The solution to this problem is simple: we batch delete post revisions by using a simple SQL [...]

Read More >>



Creating a Backup of Your Database

November 5th, 2009

The problem. While the tips in the rest of this post have been tested, you should definitely not try any of them without first having a proper backup of your MySQL database.
The solution. To create a manual backup of your WordPress database, follow these simple steps:

Log in to phpMyAdmin and select your WordPress database.
Once done, [...]

Read More >>



List Your Scheduled Posts : Wordpress Hack

November 4th, 2009

The problem. Like many bloggers, you probably want your readers to visit your blog more often or subscribe to your RSS feed. A good way to make them curious about your future posts is by listing the titles of your scheduled posts.

Read More >>



Using CSS Sliding Doors in WordPress Navigaton

November 4th, 2009

The problem. The built-in wp_list_pages() and wp_list_categories() functions allow lots of things, but they do not allow you to embed a element so that you can use the well-known CSS sliding-doors technique. Happily, with some help from PHP and regular expressions, we can use this awesome technique on a WordPress blog.

Read More >>



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 >>