By Austin on July 12, 2009
I’ve updated the site to the latest release of WordPress. 2.8.1 fixes many bug found in 2.8 and I finally was ready for the update. While everything went smoothly, I did have to update my theme a bit to run some of the additional widget area.
Using the old style dynamic_sidebar( ‘Utility: Header’ ); didn’t work [...]
Posted in News | Tagged 2.8.1, functions.php, php, Plugins
By Austin on June 10, 2009
Custom fields are definitely very useful and are used on many WordPress installs. Today I’m going to show you how to easily get custom fields values outside the loop.
Posted in Tips & Tricks | Tagged custom fields, php
By Austin on May 20, 2009
I’ve been asked before on how to display categories in multiple columns. Well, WPRecipes has posted a code snippet for this ¶
Posted in Cult | Tagged php, WPRecipes
By Austin on May 15, 2009
Ever wanted to print or echo the WordPress title attribute without spaces?
Posted in Tips & Tricks | Tagged php, the_title, Tips & Tricks
By Austin on April 9, 2009
How might you display a Google ad after the first post or anything you like? It is very simple. You just need to add the variable $loopcounter in the Loop. If the $loopcounter is less than or equal to 1, then include your option. Check out the code:
<?php if (have_posts()) : while (have_posts()) : the_post(); [...]
Posted in Tips & Tricks | Tagged php, the loop
By Austin on April 6, 2009
Here is a simple way to call query_posts with an array of options. For all options you my use visit: WordPress Codex.
<?php $my_query = array(’showposts’ => 4, ‘post__not_in’ => $do_not_duplicate); ?>
<?php query_posts($my_query); ?>
Posted in Tips & Tricks | Tagged php, query_post, WordPress
By Austin on February 4, 2009
This is an easy one, just add one line to your single.php file where you would like the Gravatar to show up.
<?php echo get_avatar( get_the_author_id(), $size = ‘96′, $default = ‘<path_to_url>’ ); ?>
Posted in Tips & Tricks | Tagged author, get_avatar, Gravatar, php, Tips & Tricks
By Austin on January 19, 2009
Ever wanted to display the title of a post somewhere but limit the amount of characters that are shown? For instance, this post has a very long title, and if I were to use <?php echo the_title() ?> it would show as follows: Limit the characters that display on the_title.
That may not fit well on [...]
Posted in Tips & Tricks | Tagged php, the_title, Tips & Tricks, WordPress
By Austin on January 11, 2009
Here is a neat trick. Say you want to show a custom field in you post or in a certain categories post. There is a simple code you need to write in order to accomplish this:
<?php $image = get_post_meta($post->ID, “image”, $single = true); ?>
<?php if($image != ”) : if(in_category(7)) { echo ”; } else { [...]
Posted in Tips & Tricks | Tagged category, custom fields, echo, image, php, post_meta
Display custom url if comment authors url is blank
By Austin on January 15, 2009
Here is a nifty trick for your comments.php template. If someone comes to your site and leaves a comment but doesn’t leave a url back to there site, the default link that is shown in place of the php code comment_author_url is the current page link.
That might not look good. So, here is a little [...]
Posted in Tips & Tricks | Tagged comment_author_url, Gravatar, php, Tips & Tricks