Cleverness – WordPress Resources

Articles

WordPress Gallery with Categories

Recently I needed to recreate a specific gallery format in WordPress.
There are probably better ways to go about it, such as custom post types, but I needed something quick and easy.

The main gallery page needed to have a list of “categories” that were represented by images.
I used a WordPress Page that consisted of:

Each “category” was an image that linked to a WordPress Page.

On the category pages, for each gallery item, there needed to be a caption on top of the image, the image with no link, and a description under the image.
For each of … continue reading

Please use print stylesheets (or something)!

Tonight I’ve been trying to print off articles on releasing themes to the public. I’ve been to about 8 or 9 sites. One had a link to print the site using printfriendly (a good option). Only one other used a print stylesheet. Some of these places even sell WordPress themes. Yet their content is unreadable when printed due to elements overlapping each other and such. And thanks, but I don’t really want to waste paper printing your comment form and all your menu items. I’m really glad printerfriendly.com is there to make any web page printable. But it’s still something … continue reading

WordPress and Ajax

I bought WordPress & Ajax by Ronald Huereca awhile ago and finally got around to reading it. When I bought it, it wasn’t available in print, like it is now (WordPress & Ajax print version on Amazon). I had a really hard time getting myself to actually read an ebook on my computer, but I recently bought a nook color and can now read all my ebooks more pleasantly.

But back to the book. I was excited when I found this book because I wanted to add ajax functionality to my to-do list plugin, but didn’t really understand how. … continue reading

Professional WordPress Plugin Development Book Review

If you develop WordPress plugins, you need to read Professional WordPress Plugin Development by Brad Williams, Ozh Richard, and Justin Tadlock.

Professional WordPress Plugin Development Review

I first read this book around the beginning of April. I learned a lot of new things. And then promptly forgot it all. So yesterday and today I went through the book again and took notes. This book is around 500 pages and covers pretty much any topic you could wish for. I made sure to pay special attention to the security section since that is probably the most important feature of plugin development.

I found things that I … continue reading

My Top WordPress Plugins

There are many top ten lists of WordPress plugins out there. They all seem to contain the same thing, with one or two variations. Contact Form 7, Google XML Sitemaps, All-in-one SEO, etc. They are great plugins and I use them as well, but I really love when they list a lesser known plugin that ends up being useful to me.

These are some of the other plugins I use.

Updated BuddyPress User Roles Code

My post on adding user types to WordPress and Buddypress has been very popular.

This code will soon be available as a plugin.

I’ve updated the code so it’s cleaner and easier to implement. This code also works with or without allowing users to add new sites.

This only works for BuddyPress running on the multisite version of WordPress.
If you’re using the regular version, someone else has a plugin available for that: WP Roles at Registration. It works for BuddyPress (but not the multisite version).

Instructions

Set up your custom WordPress roles using Capability Manager or a similar … continue reading

JavaScript and AJAX for Dummies Review

I just finished reading JavaScript and AJAX For Dummies by Andy Harris.

I like the Dummies and Idiots books. I think they’re great if you don’t know much about a subject and want to get an introduction to it.

I took a course at college about JavaScript ten years ago. Back before jQuery and all that. The knowledge didn’t really stick with me and I’ve always felt uncomfortable using JS and tried to avoid it. I want to be able to use AJAX (which I know nothing about) so I need to update my JS skills.

One of the things … continue reading

User Types in BuddyPress – Assign xprofile Groups

As requested by Janis, here is the code I use to show only certain xprofile groups to each user type. In the default BuddyPress theme, profile fields without a value aren’t shown, so only the ones for that group will appear to the public.

You will need to replace a function call in your BuddyPress theme, in /members/single/profile/edit.php. It is at line 12 in mine.

Find

And replace it with this:

In /plugins/bp-custom.php place the following code. You will need to edit it to fit your user type and profile group needs.… continue reading

Adding User Types to WordPress and BuddyPress – with User Blogs

There is a new version of this code located at http://cleverness.org/2011/01/27/updated-buddypress-user-roles-code/. Please use that code and leave all comments on that page.

I’ve previously talked about adding user types to BuddyPress. I’ve found out recently that if you allow new users to create their own blogs, you will need to add the following code to your functions.php file.… continue reading

Get Categories Author has Posted in for Custom Post Types

I needed to list all the categories of a custom post type that an author had posted in.

I found code to do that with regular posts in the wordpress.org forums and I modified it to use with custom post types.

Be sure to replace customposttype with the name of your custom post type.

Place this into your theme file where you want the list to appear.… continue reading