First page of the settings archive.

WordPress 3.0 Navigation Menu Styles

Posted by The Doctor on Mar 17, 2010 with No Comments | Short Link
Last modified by The Doctor on April 15, 2010
in Functions, Tips
as , , , , ,

Let’s jump right in …

Using the default definition from the register_sidebar() function found in ../wp-includes/widgets.php of WordPress version 3.0-alpha 3.0-beta12 (see below):

	$defaults = array(
		'name' => sprintf(__('Sidebar %d'), $i ),
		'id' => "sidebar-$i",
		'description' => '',
		'before_widget' => '<li id="%1$s" class="widget %2$s">',
		'after_widget' => "</li>\n",
		'before_title' => '<h2 class="widgettitle">',
		'after_title' => "</h2>\n",
	);

… and the default Navigation Menu widget, the following CSS style elements are generated:

  • #nav-menu-<widget instance>
  • .widget
  • .widget_nav_menu
  • .widgettitle

… with these elements generated specifically by the wp_nav_menu() function found in ../wp-includes/default-widgets.php of WordPress version 3.0-alpha 3.0-beta12:

  • .menu-<menu name>-container2
  • #menu-<menu name>
  • .menu
  • #menu-item-<unique identifier*>
  • .menu-item-type-<types: page, category, Custom>1
  • .menu-item2
  • .menu-item-type-<post_type, custom, or taxonomy>2
  • .menu-item-object-<page, or category>2
  • .current_page_item
  • .sub-menu1

This is just an initial listing of my observations as of the March 16, 2010 3.0-alpha version of WordPress. Look for future updates; and, please feel free to make note of your own observations below.

Bonus – A suggested addition to style.css for theme developers:

/* WordPress 3.0 Navigation Menu default widget */
.widget_nav_menu .menu {margin: 0;}
.widget_nav_menu .menu li {
  display: block;
  float: none;
  /* text-align: left; */
}
*N.B. – each new menu item generates its own post ID in the WordPress database ‘posts’ table. This appears to be in a similar fashion to post revisions.
    Notes:

  1. Mar 21, 2010
    • menu item type class further defined
    • sub-menu class noted
  2. Apr 15, 2010 (3.0-beta1 updates)
    • additional menu classes defined and/or modified
    • new menu container class noted

Plugin Installation

Posted by The Doctor on Dec 30, 2009 with 14 Comments | Short Link
Last modified by The Doctor on March 17, 2010
in Tips
as , , , ,

To install a WordPress plugin is in most cases fairly straight forward but if you have never installed one before the first time can be a bit awkward. Lets install two plugins with these step-by-step instructions.

First, you will need to be logged into your administration pages. This should be a familiar process. Remember this?

The typical WordPress login form

Next, on the left hand side of your screen you should see your administration pages menu. It will looks very much like this.

The admin. menu

To install a new plugin there are essentially two methods that can be done from these administration pages. Both methods make use of the menu at the top of the “Install Plugins” page. Here is a screen snippet of the page:

A screen snippet of the Install Plugins page. Click to enlarge. Click back to return.

Let’s look at the upload method first. This method only works for plugins you have downloaded to your local computer. Click on the upload link at the top of the Install Plugins page and you should see something like this on your screen:

Click on the Browse button to open the file browser for your computer.

Next, locate the plugin zip file on your local computer. In this example we will use a modified version of the Facebook Sharecount plugin by Snowball Factory, Inc. Your screen may look something like this:

An example of locating a plugin zip file

Click the “Open” button (see example image above). This will populate the field on the Install Plugins page under uploads. Click the “Install Now” button. The next step is activating the plugin which we will look at in a moment, after going through the steps to use the “Search” method(s). The “Featured”, “Popular”, “Newest”, and “Recently Updated” options are simply pre-configured special “Search” criteria. Here is a screen snippet:

Large Image. The results for searching on the term: Support. Click to enlarge. Click back to return.

Locate the plugin you are interested in using, for this example we will look at the BNS Support plugin. The plugin name itself will link to the page the plugin author has designated, the link to the far right will start the installation process. Clicking on the “install” link will open a pop-up style interface, very similar if not identical to this one:

The install now pop-up window

Clicking the big red “Install Now” button will display a screen with information like this:

After the plugin is installed it needs to be activated.

An example of the Manage Plugins page after plugin activation.

Some plugins offer functionality simply with their activation, for example the BNS Login plugin, other plugins require they are placed in a widget area of the theme. To add a plugin to one of these widget areas, you will need to click on Appearance, then click on Widgets; and, the Available Widgets page should be displayed. It will have a similar look to this example:

Large Image. An example of possible available widgets. Click to enlarge. Click back to return.

To use the plugin, drag-and-drop its title bar into an open widget area. Widget areas are theme dependent. If the widget area you want to use is not “open” first click on the small triangle on the right side of the widget area title. Now you can drag-and-drop the plugin title bar there. As you drag the plugin into the widget area, an outline of the plugin title bar will appear showing the plugin can be dropped. Once the plugin has been dropped into a widget area, if it exists, the plugin option menu will pop open. Similar to these next screen snippets:

A plugin being dragged into a widget area.

Once dropped, the plugin will pop open its option menu.

Some plugins have full pages to manage their options, either in addition or as their only method of control. This is more common for plugins that do not need or have use of being placed in a widget area. These option pages are generally placed in the admin menu at the author’s discretion. The most common area to find the plugin settings page is under … Settings, as this example shows:

A common place to find plugin settings pages is under the admin Settings.

Now you can return to your home page and see your newly installed, and configured, plugin. Congratulations!

Change the WordPress Tagline

Posted by The Doctor on Dec 13, 2009 with No Comments | Short Link
Last modified by The Doctor on March 17, 2010
in Tips
as , , ,

How to change the WordPress Tagline / Description and what makes it work.