Monthly Archives: December 2009

How To Hide WordPress’s “Update Now” Notice

We all love WordPress, but recently they have been pumping out new version faster than we can keep up.

I make websites for clients using WordPress, and one of the most annoying things is the banner displayed at the top of the admin area, saying there is a new version, and becuase of that, they want their website update now!

Like all clients, as soon as my clients see this, they have to have their website updated immediately! And then I have to go through all the joys of making sure all the plugins works etc.

So to overcome this annoying update notification, I came up witht the following solution:

I wrote a plugin called "Hide WP Nag"

It simply calls the built-in WordPress function remove_action( 'admin_notices'.
Its really simple and works very well.

I don't know how backward compatible it is, but it works in all version since 2.8.3 to 2.8.6,

You can download the . Unzip it and then upload to your /plugin directory and activate as usual.

For those propellor heads like myself, that want to see how it works, here is the plugin in all its glory 🙂


<?php
/*
Plugin Name: Hide WP Update Reminder
Plugin URI: http://websitesecrets101.com/how-to-hide-wordpresss-update-now-notification
Description: Allows you to remove the upgrade Nag screen from view
Author: Bruce Hearder
Version: 1.0
Author URI:http://websitesecrets101.com/
*/
add_action('admin_menu','bhhidenag');
function bhhidenag()
{
remove_action( 'admin_notices', 'update_nag', 3 );
}
?>

I hope this helps

[bhtweetthis] essay writer

Handling Nested Menus in WordPress

[bhtweetthis]

As you most probably have noticed that I am using WordPress more and more these day, becuase it is so easy to customise and make it do almost anything you want.

But one of the things that WordPress lacks (in its native format), is a way to handle menus.

The only way menus are made is by creating a heirarchical structure of pages. This is fine if every page has content on it, but what if you need to create a page that is just a placeholder for the child pages.
And when a user clicks on the placeholder page, you usually want it to go directly to the first child page.

nested-menuOn a recent site that I created (see image below) , I had a menu item called "Services", that was just a placeholder for the child pages.

So when someone clicked on the "Services" page, I wanted then to immediately go to the first child page. In this case its "Price List"

So how do you make this happen ?

Actually it very easy..

The trick, if you can call that is to create a new template page that only these placceholder pages will use.

Copy the following PHP code, and paste into Notepad and save as "gotofirstkid.php"

<?php
/* Template Name: Go to first child */

$pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order");
if ($pagekids) {
$firstchild = $pagekids[0];
wp_redirect(get_permalink($firstchild->ID));
} else {
// Do whatever templating you want as a fall-back.
}
?>

FTP the file up into your theme's directory, and go back into the WP admin area and then, for each placeholder page select the template called "Go To First Child".

Its done!

Now whenever someone clicks on a placeholder page, its gets taken to the first child page. So using the example shown in the image above, is someone clicks on the "Services" item, they are immediately taken to the "Price List" page.

Let me know if this helps you out at all.

I found this technique on the wordpress forum all thanks go to the orginal poster.

[bhtweetthis]

Note that a pronoun can also be the object of a www.eduessayhelper.org preposition?

Search Engine Query Cheatsheet

Using search engines every day, I soon became aware that not all search engines have the same sort of queries.

So a bit of a testing has revealed the following :

Command Google Yahoo Bing
link
Example:link:whitehouse.gove
YES YES NO
* (word or phrase replacement)
Example: ""This article has been viewed * times"
YES YES NO
AllIntitle or intitle
Example:intitle:"dog training"
YES YES YES
AllinText or intext
Example: intext:"dog training"
YES YES NO
AllInAnchor or inanchor
Example: inanchor:money
YES YES NO
AllInURL or inurl
Example : inurl:elephant
YES YES NO
cache
Example: cache:websitesecrets101.com
YES NO NO
filetype
Example: filetype:pdf
YES NO YES
- (minus, exclude word)
Example:site:whitehouse.gov -"climate change"
YES YES YES
+ (pluf, force inclusion of word or phrase)
Example: site:whitehouse.gov +"climate change"
YES YES YES

I hope this comparison helps you in your search engine searching

How To Redirect Affiliate Links

[bhtweetthis]

Everytime we make a post on our websites we generally have a link to some othersite, usually an affiliate link.

Just this morning, I was updating and old ebook of mine on how people can buy high page rank domains for just $5, and I wanted to redirect them through my affiliate link.

The affiliate link is the usual CJ (commission junction) links, in other words is long and contains lots of numbers and dashes.

So I wanted to put a link that went directly to the other site.

So, lets say we want to make a redirect on this site to Godaddy, using my affiliate link.

So if sometime types in http://websitesecrets101.com/godaddy they get sent to godaddy.com with my affiliate code in place.

So , how do we do it.

[like-lock]Its easy to do, all you have to do is open up your websites .htaccess file (please note this approach does not work on Windows servers), with your favourite text editor. Notepad works just fine!

Mine looks like this :

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Its the standard WordPress .htaccess file.

No I want to make a redirect that goes directly to the affiliate site. Lets say, for this example, I want to redirect them to Goddady. It may not be your most favorite registar but lets just se it for this example.

So using the above .htaccess file, I'll edit so that it now include the line

Redirect 301 /godaddy http://www.tkqlhce.com/click-3340454-10419685

The 301 part, means that its a permant redirect, you can use 301 or 302 here.

The /godaddy bit  is the path used on this website.

The http://www.tkqlhce.com/click-3340454-10419685 is the affiliate link I will send them to.

So now the full .htaccess file is :

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Redirect 301 /godaddy http://www.tkqlhce.com/click-3340454-10419685
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

See how I put it just after the "RewriteBase /" line? That means it will redirect without effecting your wordpress install.

[/like-lock]

So its pretty easy to make redirects by simply modifing your .htaccess file.

[bhtweetthis]

Any other formal situation, you need to remember the distinctions between subject college papers writing services and object p!