Archive for the ‘Advanced Use’ Category

User Roles in the WordPress Database

Thursday, December 1st, 2011

Where are the user roles stored for WordPress? If you have ever been looking for where the actual user roles are stored for WordPress, say because all of a sudden you have no user roles anymore, they are actually socked away in the database.  Go to your wp_options table and find ...

How to trigger the WP post page to save a post automagically

Wednesday, November 9th, 2011

There may be a time as a plugin developer when you wrote a plugin that effects the post-editing or page-editing interface for WordPress. In this case, you may also need to somehow trigger the content to auto save, like WordPress will do automatically from time to time. The best and easiest ...

How to add content based on a custom field to your posts

Wednesday, October 26th, 2011

In your theme files, you may want to add some functionality that shows after your post content if and only if you have a specific custom field set. This is actually pretty easy to do, just add this code to your functions.php file and make sure to change the name of ...

Always have “Read More” on Manual and Automatic excerpts

Tuesday, March 22nd, 2011

Previously, we have talked about modifying your post excerpts. This is great if you always use the automatic excerpts that WordPress provides.  However, if your customer every puts in a manual excerpt, this functionality won't give you the "read more" that you are expecting. What a pain, right!? Well, I have ...

Modifying your post excerpts

Tuesday, March 15th, 2011

This is my personal favorite way of modifying excerpts, I found all this information on the WordPress codex excerpts page. I think that the WordPress excerpt is a little bit short so the code below will extend it to 120 words. Also, by default WordPress only shows the [...] at the ...

My WordPress site was hacked and I have spam links in my footer!

Thursday, November 4th, 2010

If you are finding that you have links in your page source to things like sexual enhancement drugs or other fun internet spam things.. you may want to check out these guys: http://codex.wordpress.org/FAQ_My_site_was_hacked http://deanhunt.com/has-your-wordpress-blog-been-hacked/ And google: WordPress Hacked If these do not solve your problems, you may want to search your Wp-Options table for ...

Add JS form validation to your WordPress plugin

Tuesday, September 28th, 2010

I was working on a plugin that someone else created and there was a requirement for validating that a specific name field was filled in before submitting the form.  Since WordPress has jquery.form.js included in the source, I figured I could use that. Turns out it is pretty easy! First thing, ...

How to remove User profile fields

Tuesday, August 24th, 2010

Similar to this post, you can add a new function that is called by the "user_contactmethods" filter. Then, unset the values for the contact methods you no longer would like. For AIM, you would do the following in your functions.php file: function bwa_remove_some_contactmethods( $contactmethods ) { unset($contactmethods['aim']); return $contactmethods; } add_filter('user_contactmethods','bwa_remove_some_contactmethods',10,1); You can modify the other items ...

WordPress upgrade woes?

Tuesday, July 6th, 2010

It is that time again, when a new version of WordPress comes out.  Since this is a major release (3.0) and not a minor release like 2.9.2, site owners are starting to feel a little bit of pain due to the upgrade.  Some people may not notice anything and happily ...

Moving Your WordPress Site to a New Server

Monday, July 5th, 2010

If you are changing your site's domain, please read our article "Changing the Domain of your WordPress Site" as well as this one. ----- To change the server your WordPress site is hosted on is actually a fairly simple activity. The most important thing to do is NEVER take down the ...

WordPress Theme: WP-Polaroid Questionable Code

Friday, June 25th, 2010

Matt and I came across a nice business styled WordPress theme called WP-Polaroid. We both liked the style and format, and with some minor color changes we decided to make it the theme for our Spotted Koi Website. As I dug into it to make some edits we found a couple strange ...

WordPress Theme: WP-Polaroid RSS Feed Correction

Thursday, June 24th, 2010

Having recently installed WP-Polaroid on our Spotted Koi business website we wanted to run through all the links and make some customizations.  We ran across a few oddities (like this one) including a BIG problem with the RSS Feed link. It seems the designer decided that our RSS Feed ...