Source site » Digwp.com


1 Star2 Stars3 Stars4 Stars5 Stars

Display Separate Counts for Comments, Pingbacks and Trackbacks

In WordPress, there are three ways to respond to a post: you can leave a comment, leave a trackback, or just link to the post to create a pingback. When displaying all of the responses to your posts, it’s a good idea to separate the comments from the pingbacks and trackbacks. Uninterrupted comment threads are a pleasure to read, as are well-styled lists of pingbacks. This is an excellent way to improve the usability, organization, and stylishness of your comment areas.

Category: Comments | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Remove Private/Protected from Post Titles

I had the situation come up where I need a password-protected post in WordPress. Of course that is super easy in WordPress, you can set up a password for it right in the “Publish” box before publishing. But by default, WordPress appends “Protected: ” to the front of the post title, before and after the password has been entered. I didn’t like that, and thought that the password box was clue enough that the material was password protected.

Category: Posts | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Rounded Font-Sizes for Tag Clouds

Tag clouds accomplish their varied font sizes by applying inline styling to each tag. The resulting font sizes can be really weird like style=’font-size:29.3947354754px;’. There is nothing inherently wrong about that, but it feels a bit unsettling and less controllable

Category: Miscellanious | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Custom Query Shortcode: Run a Loop inside Any Post/Page

I had the occasion yesterday to have a page with a section on it where it would output a very specific set of other pages, which would need to change dynamically. What I could have done is built a special page template for this page, and inside that template run a query_posts() to get these posts. But I wanted this page to remain editable from the admin. Besides, creating a special page template every time you need to do something like this is too cumbersome. WordPress is extensible enough to do better. Hence, the Custom Query Shortcode!

Category: Miscellanious | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Include the Category ID via post_class

The default output for WordPress’ post_class template tag includes class names for just about every type of page view imaginable, but not the Category ID.

Category: Themes | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Display Gravatar & Autofill Fields for Previous Commenter

When someone comments on your site, cookies with the information the entered are saved to their computers. WordPress makes it easy to access that information. In fact, in your comments.php template they are ready-to-go PHP variables you can spit out anywhere you’d like.

Category: Comments | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Optimizing WordPress Post Navigation

Implementing a solid set of navigational links for your WordPress site is one of the best ways to encourage visitors to stick around awhile and check out additional content.

Category: Navigation | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Two Ways to Limit the Number of Posts without a Plugin

Let’s say your blog is set to display ten posts per page, as specified via the WordPress Admin under Settings > Reading. Once set, ten posts will appear on your home page, archive pages, search results, and so on. In other words, if it isn’t a single-view page or an actual “page” page, you’re gonna get ten posts per page. It’s a global setting.

Category: Posts | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

Redirect Mobile Users to a Mobile Theme

Let’s say you want to have a special theme for your WordPress site for mobile users. You don’t want to use a pre-canned solution or anything third-party, you just want to create and design the theme yourself. So what you need to happen is for the site to detect mobile users and server up an alternate theme instead. Here is how I might do it.

Category: Themes | Source: | | Report Broken Link
Processing your request, Please wait....

1 Star2 Stars3 Stars4 Stars5 Stars

How to Disable Comment Feeds for Individual Posts

This is a nice feed offering, but many people use the Subscribe to Comments plugin and find the individual-post feeds to be unnecessary. In this situation, it is easy enough to remove all comment-feed links from the theme-template files, but even after the physical links are removed, WordPress will continue to generate links in the section of your pages.

Category: Comments, RSS Feeds | Source: | | Report Broken Link
Processing your request, Please wait....
12