Archive for August, 2009

WordPress – How to Add Navigation Tabs for Categories

August 16th, 2009 1 comment

Although navigation to WordPress categories is easily done through links under the “Categories” section of most blogs, people are so used to using the normal tab or button navigation that it is nice to be able to get to the WordPress categories this way too. Although there appears to be a number of ways to do this out there on the web, and not all successful I might add, by far the easiest way to add category tabs or category button navigation is to use the plugin called pages to link to. Many thanks to Mark Jaquith the author of this plugin.

If your running a later version of WordPress, in my case at the time of this post it was V2.8.4, the easiest way to ad a plugin is to go to Admin/Plugins/Search, type in the plugin name, “Page Links To”, select “Install” under the Actions column of the search results for the plugin you desire and then “Install Now”. Be sure to “Activate Plugin” on the resulting “Installing Plugin” page.

Once the “Page Links To” plugin is installed AND activated go to your “Categories” section of your blog, click on the category of interest then copy the resulting URL from your browser and save for the next step. Create the new WordPress category page by going to Admin/Pages/Add New/ and enter your title name for your WordPress category. Then down at the bottom under the “Page Links To” section enter your category URL you saved into the box named “Point to this URL:”. Give your page an order number to place it where you want in the navigation and check out your new categories page.

Categories: Web Administration, WordPress Tags:

WordPress – Create you own Page Template

August 13th, 2009 No comments

Here is a method if you want to be able to create your own page templates and have them available to choose from when you create a new page.

Assumptions: You have shell access and are in a Linux environment.

Typically one is happy with the default page template but would like to make a modification. Lets start with the default page template, copy it to a new file name and then edit it to be a new page template.

First make a copy of the default page template renaming it. In my case I’m using the Inove theme and they have separated their templates into a subdirectory called “templates”. So we have to touch two files to keep in line with this themes format.

# cd <your wordpress directory>/wp-content/themes/inove

# cp page.php page.custom.php

# vi page.custom.php

Edit the file to look like this:

Template Name: Page by Category
<?php get_header(); ?>
<?php include(‘templates/page.custom.php’); ?>
<?php get_footer(); ?>

# cd <your wordpress directory>/wp-content/themes/inove/templates

# cp page.php page.category.php

Now make your modifications to page.custom.php under the templates directory and the next time you add a page it will be available to you as a page template.

Categories: Web Administration, WordPress Tags:

Emacs Quick PHP Configuration

August 10th, 2009 No comments

Some distributions install Emacs “fully loaded” with all the bells and whistles, some just install Emacs with the expectation that you’ll configure it to your liking.  This post will just give you the skinny on getting Emacs working with php nice and quick.

  1. Install Emacs.
  2. Go to and download and extract the latest php-mode.el in the .emacs.d directory of your home directory or in a directory of your choosing.
  3. Create or append the following in you ~/.emacs file being sure to give the proper location of you php-mode.el file.

    (setq inhibit-splash-screen t)
    (add-to-list ‘load-path “~/.emacs.d”)
    (require ‘php-mode)
    (add-to-list ‘auto-mode-alist ‘(“\\.ctp$” . php-mode))

  4. Save your .emacs file and test emacs on a php file.  You should get all the nice color coding and other niceties.  Incidentally, omit the first line about splash screen if you enjoy seeing it every time you start emacs.

If you find this post useful please leave us a comment.  Thank you!

Categories: Linux Tags: ,