Category: WordPress

More Fun with WordPress Screen Options

Unlock the power of screen options
After taking a look at “Screen Options” on the WordPress menus page (Appearance > Menus) – I decided to spend some time going through the different “Screen Options” on each admin page view and would highly recommend you doing the same. This very useful tab allows you to:

  • Choose what you see on the dashboard (and how it is displayed)
  • Show/hide fields on the edit post page
  • Choose the number of posts/pages/categories/tags/plugins/users you see in those listings (great if you want to show more than the default number)
  • Show/hide columns in the posts/pages/categories/tags/plugins/users listings
  • Enable/disable accessibility mode (Appearance > Widgets)
  • Show/hide different options in WordPress menus (like mentioned in the previous post)

If you plan to spend a lot of time in the backend of WordPress – do yourself a favor and get familiar with these options as you will at some point find something useful about those options.

HOWTO: Add Custom Classes to Individual Items (wp_nav_menu)

The WordPress function wp_nav_menu() is a great way to give users the ability to control their menu items (WordPress 3.0+). You can easily add/delete/move menu items by using the WordPress admin. I recently was working on a site where I wanted to add a class to the first menu item – as the padding/border for this item needed to be different than the other menu items. Fortunately – this was very easy by doing the following:

  1. Click on the “Screen Options” tab at the top right of the admin panel when on the Menu admin page (Appearance > Menus).
  2. Select “CSS Classes” under “Show advanced menu properties”. (Also there are options to add a link target, description, and a link relationship).
  3. Edit your menu items and now notice there is a spot to add a class for each individual item.

This is a great way to add a “first” or “last” or anything else you want to add on certain items.

Why not just use the IDs?
I specifically did this because I was using multiple menus (same menu class) and instead of using the list item IDs to add custom CSS for multiple IDs – I simplified it by adding a “first” class that would then cover all my menus.

HOWTO: Import WordPress Links

Ever get ready to migrate your site to a new host and after you exported your data using WordPress’s admin > Tools > Export and then realize your WordPress links (defined in WordPress’s admin > Links) did not get exported?

Importing your WordPress links is an easy and painless process. Simply go to your WordPress Admin > Import > Blogroll > and type in the URL to your site – with “/wp-links-opml.php on the end (http://example.com/wp-links-opml.php).

No more links left behind!

SDAC Plugin Update: SDAC Related Content 2.3

After an overly busy few months – I finally had some time to update the SDAC Related Content plugin to clean up the code, redo the admin, and simplify wherever possible.

If you are looking for a related posts or related content plugin that uses cacheing and does not create any new tables in your WordPress database – look no further. Download your copy today: http://wordpress.org/extend/plugins/sdac-related-content/

WordPress 3.0 Is Available

WordPress 3.0. has officially been released. This update fixes over 1,200 bugs and adds in a number of exciting changes including custom post types, a new default theme, a lighter admin interface, the merge of WordPress MU and WordPress, a menu admin, and much more!

Check out the WordPress 3.0 video tour:

You can read more about all the changes and updates that went into 3.0 if you are interested. You can also see all the bug fixes as well.

Download the latest versions of WordPress: WordPress 3.0

Include or Exclude Category for RSS Feed or Search

There are certain times when you need to include or exclude certain categories in the feed or search results. The easiest way to take care of this is to add the following to your functions.php file.

function sdac_remove_from_feed( $query ) {
	if ( $query->is_feed ) {
		$query->set( 'cat',-1 );
	}
        return $query;
}
add_filter( 'pre_get_posts','sdac_remove_from_feed' );

The code above will exclude all posts that are in the category with ID 1 from your feed. If you wanted to exclude everything from the search results – you would change one line:
$query->is_feed to $query->is_search

If you wanted to only show items from the category with ID 1 – you would just need to remove the “-” before the category number.

Note: You can include/exclude items tagged, etc by changing the ‘cat’ to whatever else you would normally use in the query.

SDAC Plugin: SDAC Translate

We are happy to introduce a lightweight translation plugin/widget that allows you to offer site translation using Google Translate.

Our goal was to make something completely customizable, efficient. and lightweight using:

  • Completely customizable admin which allows you to choose what languages to display as well as how you want them displayed (language name vs. flag, vs. both).
  • CSS sprites so that all flags are loaded in using one image (saving overhead)
  • Widget output caching (saving queries)
  • No new database tables

Screenshots:

Download

Download Plugin (from WordPress.org Plugin Directory)

VaultPress

Now that so many of us use WordPress to manage content on our personal and business web sites – the thought of losing any of our content, data, or customizations can be quite scary (especially if you do not have a tested backup plan in place).

Welcome VaultPress. VaultPress is a new service from Automattic that gives blog and business owners alike peace of mind with their WordPress sites. After installing the plugin (currently in beta) – your data, content, themes, plugins, etc will be “safeguarded”. This means if something happens (server failure, database corruption, happy deleter, etc) you can use VaultPress to restore what you lost. In addition, VaultPress also monitors your WordPress site and will even store updates so you are always on top of the latest bug and security fixes.

This new service is quite exciting as we often get calls from clients who either lost data, accidentally deleted files, or have an out of date version of WordPress which was hacked. Having a service like VaultPress to recommend to clients and friends makes WordPress all the better solution when it comes to managing your online content.

Great work!

Neat and Useful wp-config Settings

There are a ton of great options available for you to put into your wp-config.php file which can help your site run smoother, give you that extra customization you wanted without the use of plugins, and aid in development and debugging.

Here are some highlights that can help save you time and headaches by adding the following to your wp-config.php file:

Help for the Average User

  • Change the Autosave Interval: define(‘AUTOSAVE_INTERVAL’, 30 ); (30 = 30 seconds)
  • Disable Post Revisions: define(‘WP_POST_REVISIONS’, false );
  • Modify Empty Trash Time: define(‘EMPTY_TRASH_DAYS’, 7 ); (7 = 7 days)
  • Auto Optimize Your Database: define(‘WP_ALLOW_REPAIR’, true);
  • Enable the Cache:define(‘WP_CACHE’, true);
  • Define Maximum # of Revisions:define(‘WP_POST_REVISIONS’, 5);

Help for Developers

  • Output Errors:define(‘WP_DEBUG’, true);
  • Save Queries for Analysis:define(‘SAVEQUERIES’, true);
  • Define WP Site URL (override settings):define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘SERVER_NAME’] . ‘/path/to/wordpress’); – great for moving sites from one host to another when the actual domain name is not yet available
  • Define WP Home (override settings):define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’); – great for moving sites from one host to another when the actual domain name is not yet available

Full documentation is available: http://codex.wordpress.org/Editing_wp-config.php