Working With WordPress Shortcodes

185

WordPress shortcodes are used frequently in plugins and themes as a way to achieve extra functionality, without the need to modify template files. You just type the shortcode word right into your post. Some plugins and themes use them to add event calendars, some for making announcements, while others use them for inserting contact forms.

Simply, WP shortcodes are awesome.

However, what if you’re a theme / plugin developer wishing to use them for your next great product, but you have no idea where to start? We’re going to fix that in this tutorial.

Read More »

How To Write a Restricted Content Plugin

73

Restrict content to registered users

There are a lot of sites out there, particularly digital education sites, such as Net Tuts and Blender Cookie, that push out a lot of “premium” content that is only accessible to registered users.

In this tutorial, I’m going to show you some of the basics of writing a WordPress plugin from scratch that will allow you to restrict content on your site to registered users. You will be able to restrict complete pages / posts by clicking a check box or just sections of content using WordPress shortcodes.

Read More »

Custom Font Uploader for WordPress Themes

164

WordPress theme option panels were a tremendous stride in the world of theme development; they gave site owner’s the ability to modify various aspects of their site, without ever having to touch the code. Every great theme either has or should have an extensive options panel.

In this tutorial, I’m going to demonstrate how to add a custom font uploader to your options panel. This will allow site owners to upload any number of font files and apply them to different sections of the site.

Read More »

Advanced WordPress Comment Styles and Tricks

257

Advanced WordPress Comment Styles

Comments are gold. There’s little a blogger loves more than to see a whole list of comments posted on his/her article. It’s great to know people want to engage with you, and they can add a lot to an article.

However, if comments are not done well, they can be difficult to read and follow, or even just downright boring.

What we’re going to do first is create a custom comment callback that allows us to specify the way the comments are output, then lay out the structure for the comment list and reply form, add extra functionality such as author-only styles, implement comment subscription options and spam protection, and, finally, we’ll add nice CSS styling to everything we’ve done.

Read More »

Automatic WordPress Thumbnail Without Custom Field

229

thumbnail-preview

Let’s say you want to show thumbnails in your blog’s front page. A lot of blogs do that now and it’s a good way of making the page look more alive.

The only problem though is that using custom fields can be complicated and time-wasting. This post will show you how to make your theme generate thumbnails automatically, based on your post’s first image.

This trick is done by mixing some wordpress hacks and a php script. The PHP script is Darren Hoyt’s timthumb.php, the hack is WpRecipe’s how to get the first post image.

Read More »

Styling Different Posts in Different Ways With Post_Class

63

With WordPress 2.7 came the post_class function. This gives a set of CSS classes to a post, depending on what’s Read More »

Read More »

Automatic SEO Titles for All Your Pages

52

milotitles1

The title of your page (The few words in the very top bar of your browser window)  is arguably the most important thing search engines look at as they decide where to rank your page.

Most themes come with a very basic title set up; the name of your post and the name of the blog. It works well enough on regular post pages, but what about search pages, archives, 404s and all the others?

Read More »

Page 1 of 212