Limit the Number of Pages in Your WordPress Navigation Bar

We will show you how to make specific pages show up in your navigation Structure.

Using the “include” function in WordPress you can specify the exact number of pages you want to show in your navigation.

Note -There are plugins which will order the pages for you, but I have not found any plugins which will limit the number of pages showing. Also page order plugins can slow down your page load.

Example: Show traffic is gold.
You need to edit the header.php file found here:

Open the file with your favorite editor.
Search the file for “wp_list_pages”

The default should look like this:

Change to this

Upload the file and your site should only show the pages you’ve indicated.

Protect Your WordPress Site From a Malicious Attack

Protecting your WordPress site from a malicious attack by using an .htaccess file in your upload folder.


When uploading pictures to your WordPress site, your host may require you to set the permissions of the upload folder to 775 or even 777. VERY BAD!!!

A permission of 777 gives everyone read, write and execute privileges on that folder. This is very dangerous and can give hackers the ability to access your site and server via this wide open folder.

Minimize your exposure by adding an .htaccess file to the folder with the following code.

order deny,allow
deny from all

This will allow only certain files to be uploaded to this folder and deny all others, most importantly files that contain scripts.

Word of caution: No site is 100% safe. If a hacker wants into your site bad enough they probably can find a way. But by keeping up to date on software and plugin updates, will helps to reduce your risk of an attack.

Excluding Categories in WordPress Sidebar Widget

This is a short Youtube video demo on how you can exclude categories from you side bar if using the sidebar widget. This requires us to edit the widgets.php file instead of the sidebar.php file. More how to videos can be found at the Traffic is Gold Youtube channel.

Similar Videos:
Excluding Pages In The WordPress Sidebar

We also announce our videos on Twitter, you can follow us on Twitter here: @trafficisgold.

Step by Step code credit goes to Lance Hoff

Step 1:
Download widgets.php from here: wp-includes/widgets.php

Step 2:
Find this line of code:
$d = $options[$number][‘dropdown’] ? ‘1’ : ‘0’;

under it palce this line of code: $ex = “1,2,3”;
(NOTE: change out 1,2,3 with the actual Categories you want to exclude.)

So all together it looks like this:
$d = $options[$number][‘dropdown’] ? ‘1’ : ‘0’;
$ex = “1,2,3”;

Step 3:

$cat_args = array(‘orderby’ => ‘name’, ‘show_count’ => $c, ‘hierarchical’ => $h);

$cat_args = array(‘orderby’ => ‘name’, ‘show_count’ => $c, ‘hierarchical’ => $h, ‘exclude’ => $ex );

Step 4:
Save the file and uplaod back to it’s original location

You are done!!

Again thanks to Lance for the code and his step by step blog post. Please visit the site here.

Adding YouTube Videos to your Blog Post

A quick Video on how to embed video into your blog post with out using a plugin. This video tutorial is only for the WordPress blogging platform. There are several great WP flash video embed plugins, but this will show you a quick way of adding video to your post, without the need for a plugin.

Watch more of my videos here: Traffic is Gold Youtube Channel

Making WordPress SEO Friendly URLS

SEO_WP_image.gifI put together a short video on how to make your [tag]WordPress blog[/tag] [tag]URL[/tag]s [tag]search engine friendly[/tag]. It’s a simple task, but can help you out tremendously in your effort to [tag]rank[/tag] on the front page of the major search engines.

How it works: WordPress takes advantage of the [tag].htacess file[/tag] to do a [tag]URL re-write[/tag].

The default setting:

URL re-write change:

Check out the video and if you have any questions just leave a comment and I will see what I can do to help.