Prevent Google From Indexing Your Images

May 6, 2008

For most of us, traffic is the driving force behind our blogs and motivation to blog. Therefore, it may seem silly to think that you would want to prevent a lot of potential traffic from Google’s image search. However, some bloggers like to post personal pictures, or custom make their pictures and don’t want others to take them when possible. If you fit into this category, you can easily prevent Google from indexing your pictures by placing the following code into your blog’s header file above the < /head > tag: <meta... [Read the full story]

Displaying Content Only For The Admin To See

May 6, 2008

Some code that looks at the user id to determine if the user has admin privileges and then displays whatever you tell it to for that user. Here is the code: <?php global $user_ID; if( $user_ID ) : ?> <?php if( current_user_can('level_10') ) : ?> <a href=”http://yourdomainurl.com/stats/“>Stats</a> <?php else : ?> <?php endif; ?> <?php endif; ?> If you run a multi-author blog and would like to make this stuff available to editors, authors, contributors, and more, you can easily... [Read the full story]

Display the Recent Posts of Specific Categories

May 6, 2008

Most WordPress themes, by default, come with Recent Posts displayed automatically. Depending on the type of blog you run, it is possible that you would prefer to display Recent Posts per category. If this is the case, here is what you need to do to only display recent posts for specific categories. First, you’ll want to find your Recent Posts code, which is usually found in the sidebar. It will look something like this: <h2>Recent Posts</h2> <ul> <?php get_archives('postbypost', 10); ?> </ul> As... [Read the full story]

Highlight author comments in wordPress

May 6, 2008

How to highlight author comments in WordPress? The trick is simple: instead of checking the author’s email address, check their user id to see if it’s the user id of the wordpress owner. Pretty smart. After that, it was a simple matter of 1. Changing my theme to add an “authcomment” style I edited style.css and near the bottom added these lines: .authcomment { background-color: #B3FFCC !important; } 2. Editing my comments.php file to add a little code My comments.php file had a line that looked like this: <li... [Read the full story]

Displaying WordPress categories in a horizontal dropdown menu

May 6, 2008

One thing more WordPress bloggers have been doing lately is moving their categories over to a horizontal menu, rather than displaying them in the sidebar. Depending on the type of blog you run and how well you keep your categories organized, I think this can be a great idea to help manage the website and improve overall navigation. Doing something like this allows for a much better use of sub-categories, and gives you the option of displaying them in a drop-down to give your blog a much more professional feeling. If you... [Read the full story]

Page 6 of 7« First...«34567»