WordPress Tips and Tuts

Home / WordPress Tips

How to Disable The Help Menu For Admin Only

The ‘help’ tab in the top right corner of the WordPress admin is most of the time unnecessary for your clients. With some simple...

Make Archives Page Include Custom Post Types

Archives.php only shows content of type 'post', but you can alter it to include custom post types. Add this filter to your...

How Do I Redirect Upon Login a Specific User Based on Role?

Adding this snippet to the functions.php of your wordpress theme will let you redirect users based on roles or capabilities. function...

Using post_class Limit Number of Classes

Adding this snippet to the functions.php of your wordpress theme will let you limit the number of classes displayed when using post_class,...

Shortcode Snippet to Display External Files

function show_file_func( $atts ) { extract( shortcode_atts( array( 'file' => '' ), $atts ) ); ...

How To Remove Unneeded Thumbnails

Adding some or all of these lines of code to the functions.php of your wordpress theme will effectively remove some of the default...

Return The ID of The Parent Page if The Page Has a Parent

Return the ID of the parent page if the page has a parent. Just add this snippet to the functions.php of your wordpress theme and your...

Display a Default Message When No Excerpt Has Been Added

Adding this snippet to your wordpress theme will allow you to display default message when no excerpt available. $excerpt = get_the_excerpt(); if...

Only Show The Comments to The Authors Own Posts Within The WordPress Admin

This is a great little snippet if you want authors to look after their own comments.  Only show the comments to the authors own posts...

How to Check if post / page has a gallery

Add this code to the single.php template of your wordpress theme inside the loop. It will let you check to see if a post contains the...

Create User Login Using An Email Address Or A Username

I needed to figure out how to allow a user to use either their username or email address to log into WordPress. It took a bit of rooting...

How To Add New Class to First Post

Sometimes WordPress developers or users want to make their latest post looks different from the rest for their theme. This can be done...
Get Access To All Items at WordPress Eden for as Small as $55  Signup Now