More and more clients are using WordPress as their CMS. As a designer or developer, you should really get into WordPress coding. To get started, you can read my WordPress theme guide and hacks. Now, I would like to recommend a resourceful WordPress site to you called WpRecipes. This post contains over 20 recipes that I hand picked from WpRecipes. If you have any good WordPress code or hacks that you want to share, feel free to send them over and I will post it.

Display Tags In A Dropdown Menu

In your theme folder, paste the following code to the functions.php file. If you don’t have a functions.php file, create one.

<?php
function dropdown_tag_cloud( $args = '' ) {
	$defaults = array(
		'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
		'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
		'exclude' => '', 'include' => ''
	);
	$args = wp_parse_args( $args, $defaults );

	$tags = get_tags( array_merge($args, array('orderby' => 'count', 'order' => 'DESC')) ); // Always query top tags

	if ( empty($tags) )
		return;

	$return = dropdown_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
	if ( is_wp_error( $return ) )
		return false;
	else
		echo apply_filters( 'dropdown_tag_cloud', $return, $args );
}

function dropdown_generate_tag_cloud( $tags, $args = '' ) {
	global $wp_rewrite;
	$defaults = array(
		'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
		'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC'
	);
	$args = wp_parse_args( $args, $defaults );
	extract($args);

	if ( !$tags )
		return;
	$counts = $tag_links = array();
	foreach ( (array) $tags as $tag ) {
		$counts[$tag->name] = $tag->count;
		$tag_links[$tag->name] = get_tag_link( $tag->term_id );
		if ( is_wp_error( $tag_links[$tag->name] ) )
			return $tag_links[$tag->name];
		$tag_ids[$tag->name] = $tag->term_id;
	}

	$min_count = min($counts);
	$spread = max($counts) - $min_count;
	if ( $spread <= 0 )
		$spread = 1;
	$font_spread = $largest - $smallest;
	if ( $font_spread <= 0 )
		$font_spread = 1;
	$font_step = $font_spread / $spread;

	// SQL cannot save you; this is a second (potentially different) sort on a subset of data.
	if ( 'name' == $orderby )
		uksort($counts, 'strnatcasecmp');
	else
		asort($counts);

	if ( 'DESC' == $order )
		$counts = array_reverse( $counts, true );

	$a = array();

	$rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : '';

	foreach ( $counts as $tag => $count ) {
		$tag_id = $tag_ids[$tag];
		$tag_link = clean_url($tag_links[$tag]);
		$tag = str_replace(' ', '&nbsp;', wp_specialchars( $tag ));
		$a[] = "\t<option value='$tag_link'>$tag ($count)</option>";
	}

	switch ( $format ) :
	case 'array' :
		$return =& $a;
		break;
	case 'list' :
		$return = "<ul class='wp-tag-cloud'>\n\t<li>";
		$return .= join("</li>\n\t<li>", $a);
		$return .= "</li>\n</ul>\n";
		break;
	default :
		$return = join("\n", $a);
		break;
	endswitch;

	return apply_filters( 'dropdown_generate_tag_cloud', $return, $tags, $args );
}
?>

Now open the file where you want the list to be displayed and paste the following code:

<select name="tag-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
	<option value="#">Tags</option>
	<?php dropdown_tag_cloud('number=0&order=asc'); ?>
</select>

Via: WpRecipes Credits: WpHacks

Get Posts Published Between Two Particular Dates

Just before the loop starts, paste the following code. Change the dates on line 3 according to your needs.

<?php
  function filter_where($where = '') {
        $where .= " AND post_date >= '2009-05-01' AND post_date <= '2009-05-15'";
    return $where;
  }
add_filter('posts_where', 'filter_where');
query_posts($query_string);
?>

Via: WpRecipes Credits: Codex

Get Posts With A Specific Custom Field & Value

Add the query_posts() function just before the Loop. Change the meta_key and meta_value accordingly. The example shown below will get posts with custom field "review_type" with value "movie".

<?php query_posts('meta_key=review_type&meta_value=movie');  ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
...
...

Via: WpRecipes Credits: John Kolbert

Get Latest Sticky Posts

Paste the following code before the loop. This code will retrieve the 5 most recent sticky posts. To change the number of retrieved posts, just change the 5 by the desired value on line 4.

<?php
	$sticky = get_option('sticky_posts');
	rsort( $sticky );
	$sticky = array_slice( $sticky, 0, 5);
        query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) );
?>

Via: WpRecipes Credits: Justin Tadlock

Automatically Insert Content In Your Feeds

In your theme folder, functions.php file, paste the following code. This code will automatically insert the content after each post in your RSS feeds. Hence you can use this code to insert ads or promotional text.

function insertFootNote($content) {
        if(!is_feed() && !is_home()) {
                $content.= "<h4>Enjoyed this article?</h4>";
                $content.= "<p>Subscribe to our <a href='#'>RSS feed</a></p>";
        }
        return $content;
}
add_filter ('the_content', 'insertFootNote');

Via: WpRecipes Credits: Cédric Bousmane

Display The Most Commented Posts

Just paste the following code in your template file where you want to display the most commented posts (eg. sidebar.php). To change the number of displayed posts, simply change the 5 on line 3.

<h2>Popular Posts</h2>
<ul>
<?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 5");
foreach ($result as $post) {
setup_postdata($post);
$postid = $post->ID;
$title = $post->post_title;
$commentcount = $post->comment_count;
if ($commentcount != 0) { ?>

<li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>">
<?php echo $title ?></a> {<?php echo $commentcount ?>}</li>
<?php } } ?>

</ul>

Via: WpRecipes Credits: ProBlogDesign

Display Most Commented Posts In 2008

<h2>Most commented posts from 2008</h2>
<ul>
<?php
$result = $wpdb->get_results("SELECT comment_count,ID,post_title, post_date FROM $wpdb->posts WHERE post_date BETWEEN '2008-01-01' AND '2008-12-31' ORDER BY comment_count DESC LIMIT 0 , 10");

foreach ($result as $topten) {
    $postid = $topten->ID;
    $title = $topten->post_title;
    $commentcount = $topten->comment_count;
    if ($commentcount != 0) {
    ?>
         <li><a href="<?php echo get_permalink($postid); ?>"><?php echo $title ?></a></li>

    <?php }
}
?>
</ul>

Via: WpRecipes

Display Related Posts Based On Post Tags

This code will display related posts based on the current post tag(s). It must be pasted within the loop.

<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
  echo 'Related Posts';
  $first_tag = $tags[0]->term_id;
  $args=array(
    'tag__in' => array($first_tag),
    'post__not_in' => array($post->ID),
    'showposts'=>5,
    'caller_get_posts'=>1
   );
  $my_query = new WP_Query($args);
  if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>

      <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
      <?php
    endwhile;
  }
}
?>

Via: WpRecipes Credits: MichaelH

Display The Number Of Search Results

Open search.php, copy and paste the following code.

<h2 class="pagetitle">Search Results for <?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<span class="search-terms">'); echo $key; _e('</span>'); _e(' — '); echo $count . ' '; _e('articles'); wp_reset_query(); ?></h2>

Via: WpRecipes Credits: ProBlogDesign

Display The Comment Page Number In The <Title> Tag

Open the header.php file. Paste the following code in between the <title> tag.

<?php if ( $cpage < 2 ) {}
else { echo (' - comment page '); echo ($cpage);}
?>

Via: WpRecipes Credits: Malcolm Coles

Display The Future Posts

The following code will display 10 future posts.


	<p>Future events</p>
	<?php query_posts('showposts=10&post_status=future'); ?>
	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

			<p><?php the_title(); ?> <?php the_time('j. F Y'); ?></p>

	<?php endwhile; else: ?><p>No future posts.</p><?php endif; ?>

Via: WpRecipes

Randomize Posts Order

To randomize posts order, just add the following code before the Loop.

query_posts('orderby=rand');
//the Loop here...

Via: WpRecipes

Display Word Count Of The Post

Open single.php and paste the following code where you want to display the word count.

<?php function count_words($str){
     $words = 0;
     $str = eregi_replace(" +", " ", $str);
     $array = explode(" ", $str);
     for($i=0;$i < count($array);$i++)
 	 {
         if (eregi("[0-9A-Za-zÀ-ÖØ-öø-ÿ]", $array[$i]))
             $words++;
     }
     return $words;
 }?>
 
 Word count: <?php echo count_words($post->post_content); ?>

Via: WpRecipes

Fetch RSS Feeds

To display RSS feeds, you can use the WordPress built-in RSS parser. To do so, include the rss.php file, and then use its wp_rss() function.

<?php include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('http://feeds2.feedburner.com/WebDesignerWall', 5); ?>

Via: WpRecipes

Highlight Searched Text In Search Results

Open search.php file and find the the_title() function. Replace it with the following:

echo $title;

Now, just before the modified line, add this code:

<?php
	$title 	= get_the_title();
	$keys= explode(" ",$s);
	$title 	= preg_replace('/('.implode('|', $keys) .')/iu',
		'<strong class="search-excerpt">\0</strong>',
		$title);
?>

Then open the style.css file. Add the following line to it:

strong.search-excerpt { background: yellow; }

Via: WpRecipes Credits: Joost de Valk

Display A Greeting Message On A Specific Date (PHP)

The following code will dispaly a greeting message only on Christmas day.

<?php
if ((date('m') == 12) && (date('d') == 25)) { ?>
    <h2>Merry Christmas!</h2>
<?php } ?>

Via: WpRecipes

Automatically Create A TinyURL For Each Post

Open the functions.php file and paste the following code:

function getTinyUrl($url) {
    $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
    return $tinyurl;
}

In the single.php file, paste the following within the loop where you want to display the TinyURL:

<?php
$turl = getTinyUrl(get_permalink($post->ID));
echo 'Tiny Url for this post: <a href="'.$turl.'">'.$turl.'</a>'
?>

Via: WpRecipes

Exclude Categories From Search

Open the search.php file in your theme folder, paste the following code before the Loop. The code will exclude categories with ID 1, 2, 3 in the search results.

<?php if( is_search() )  :
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("s=$s&paged=$paged&cat=-1,-2,-3");
endif; ?>

//the Loop here...

Via: WpRecipes

Exclude Categories From RSS

Open the functions.php file from your theme. If your theme doesn’t have a functions.php file, create one. Paste the following code in it:

<?php function myFilter($query) {
    if ($query->is_feed) {
        $query->set('cat','-5'); //Don't forget to change the category ID =^o^=
    }
return $query;
}

add_filter('pre_get_posts','myFilter');
?>

Via: WpRecipes Credits: Scott Jangro

Using Shortcodes

Open the functions.php file, paste the following code.

<?php function wprecipes() {
    return 'Have you checked out WpRecipes today?';
}

add_shortcode('wpr', 'wprecipes');
?>

You’re now able to use the wpr shortcode. To do so, paste the following line of code on the editor (in HTML mode) while writing a post:

[wpr]

This short code will output the “Have you checked out WpRecipes today?” message.

Via: WpRecipes Source: Codex

Display The Number Of Your Twitter Followers

Paste the code anywhere you want to display the Twitter follower count. Replace "YourUserID" with your Twitter account in last line.

<?php function string_getInsertedString($long_string,$short_string,$is_html=false){
  if($short_string>=strlen($long_string))return false;
  $insertion_length=strlen($long_string)-strlen($short_string);
  for($i=0;$i<strlen($short_string);++$i){
    if($long_string[$i]!=$short_string[$i])break;
  }
  $inserted_string=substr($long_string,$i,$insertion_length);
  if($is_html && $inserted_string[$insertion_length-1]=='<'){
    $inserted_string='<'.substr($inserted_string,0,$insertion_length-1);
  }
  return $inserted_string;
}

function DOMElement_getOuterHTML($document,$element){
  $html=$document->saveHTML();
  $element->parentNode->removeChild($element);
  $html2=$document->saveHTML();
  return string_getInsertedString($html,$html2,true);
}

function getFollowers($username){
  $x = file_get_contents("http://twitter.com/".$username);
  $doc = new DomDocument;
  @$doc->loadHTML($x);
  $ele = $doc->getElementById('follower_count');
  $innerHTML=preg_replace('/^<[^>]*>(.*)<[^>]*>$/',"\\1",DOMElement_getOuterHTML($doc,$ele));
  return $innerHTML;
}
?>

<?php echo getFollowers("YourUserID")." followers"; ?>

Via: WpRecipes

Display FeedBurner Subscriber Count In Text

<?php
	$fburl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=feed-id";
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, $fburl);
	$stored = curl_exec($ch);
	curl_close($ch);
	$grid = new SimpleXMLElement($stored);
	$rsscount = $grid->feed->entry['circulation'];
	echo $rsscount;
?>

Via: WpRecipes

Display The Latest Twitter Entry

Just paste this code in the template file (eg. sidebar.php) where you want to display the latest tweet.

<?php

// Your twitter username.
$username = "TwitterUsername";

$prefix = "<h2>My last Tweet</h2>";

$suffix = "";

$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1";

function parse_feed($feed) {
    $stepOne = explode("<content type=\"html\">", $feed);
    $stepTwo = explode("</content>", $stepOne[1]);
    $tweet = $stepTwo[0];
    $tweet = str_replace("&lt;", "<", $tweet);
    $tweet = str_replace("&gt;", ">", $tweet);
    return $tweet;
}

$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix);
?>

Via: WpRecipes Credits: Ryan Barr

Social Buttons

Facebook Share Button

<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>">Share on Facebook</a>

Digg it

<a href="http://www.digg.com/submit?phase=2&url=<?php the_permalink();?>">Digg It</a>

Stumble upon it

<a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>">Stumble upon it</a>

Add to delicious

<a href="http://delicious.com/post?url=<?php the_permalink();?>&title=<?php the_title();?>">Add to delicious</a>

Share on technorati

<a href="http://technorati.com/faves?sub=addfavbtn&add=<?php the_permalink();?>">Share on technorati</a>

Tweet this

<a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>">Tweet this</a>

195 Comments

dlv
Jun 30, 2009 at 12:34 am

great one, a big list to read slowly
now i’m going to sleep, tomorrow i’ll read it :)

thanks for share as always !

CreamScoop
Jun 30, 2009 at 12:43 am

Thanks for the compilation.

Cyrill D.
Jun 30, 2009 at 12:45 am

Thanks for share!

Kersheys
Jun 30, 2009 at 12:46 am

Excellent list. I’ve been looking for some new things to incorporate. In any case, I’ve found a new website to look at when I need specific codes :D Thanks!

laogao
Jun 30, 2009 at 12:57 am

thanks for your post,it’s very useful for me.

Mahallo Media
Jun 30, 2009 at 12:57 am

Great list of wp codes, thanks for sharing!

Jean-Baptiste Jung
Jun 30, 2009 at 1:18 am

Hello Nick,
Thanks a lot for featuring WpRecipes on WDD! I’m extremly honored :)
I hope theses recipes will be helpful for your readers!

Danno
Jun 30, 2009 at 1:54 am

Excellent resource. Thanks.

romain
Jun 30, 2009 at 2:13 am

hi nick,
that is exactly what i was looking for, great timing :) .
One more really useful post.
thanks a lot.

Hezi
Jun 30, 2009 at 2:18 am

wonderful post! now waiting for some wordpress appetizers!

Faiz Indra
Jun 30, 2009 at 2:21 am

Wow…..
It’s wonderfull post. It was help us about WordPress Script.
Thanks…

Arjen
Jun 30, 2009 at 2:23 am

Awesome! Thanks for sharing this nice list.

I’ll work out the ‘show posts between dates’ code.

Adam Akers
Jun 30, 2009 at 2:40 am

Great stuff again.

Cheers

nIc
Jun 30, 2009 at 4:10 am

Great, I’m now learning about wordpress… thanks!

Abu Farhan
Jun 30, 2009 at 4:15 am

Thanks for sharing, I’ll use Tags In A Dropdown Menu

Raymond Selda
Jun 30, 2009 at 4:30 am

Wow! I love WordPress and this snippets will definitely help a lot. Thank you for sharing Nick.

Manuel
Jun 30, 2009 at 4:35 am

sweeeet!
there are some useful bits of information. thx again;)

Manuel

Sunil
Jun 30, 2009 at 5:12 am

Need to check all today.. Thanks a lot

DKumar M.
Jun 30, 2009 at 5:33 am

Nice Tips and tricks nick…. thanks for sharing !!!

DKumar M.
@instantshift

Web Design Va
Jun 30, 2009 at 6:08 am

FABULOUS!! Thank you for posting!

Siti Web Bologna
Jun 30, 2009 at 6:46 am

Finally! We were waiting a long article another freat article as this! Thanks

BeyondRandom
Jun 30, 2009 at 7:47 am

great collection of some codes! Have been wanting to use a few of these. Bookmarked!

davit
Jun 30, 2009 at 7:54 am

Bookmarked! thank you for doing this

Arjen
Jun 30, 2009 at 9:28 am

I just added the related posts code to my post footer, and added the twitter count to my about page. It works great, and is easy to use.

Thanks again!

Accessible Web Design - Richard
Jun 30, 2009 at 10:43 am

Early days with my understanding of WordPress but these look really useful thanks.
I particularly like the one to display future posts – does that mean I can see in advance what I will post next week? Would be a great timesaver as I could just cut and paste it then post it :)

Duncan
Jun 30, 2009 at 10:59 am

Fantastic list! great to see all of these in one place. WP development is something im personally expanding my knowledge on and this will really help.
Cheers for this! :-)

Chris
Jun 30, 2009 at 11:31 am

Not sure if this was an error made in haste, but the code snippet you provide in the “Automatically Insert Content In Your Feeds” example won’t actually insert that piece of content into a feed. It does a check to make sure the content is NOT a feed and NOT on the homepage and then inserts some static content at the bottom of the post (on an individual post page, for instance). In this case, that additional content simply suggests subscribing to the RSS feed for the site.

Hope that clears up confusion for anyone just cutting and pasting that snippet, and thanks to the author for passing on the WpRecipes.com resource!

Jason
Jun 30, 2009 at 12:51 pm

Perfect post at the perfect time. I was just working on many of these for a re-design. Thanks!

Josh
Jun 30, 2009 at 1:14 pm

A lovely resources, thanks!

Tom Boyd
Jun 30, 2009 at 1:57 pm

Thanks for these they will come in very handy!

Logo Designer
Jun 30, 2009 at 2:03 pm

Thank you for this great tutorial on wordpress…

Cheers Mate!

Hendryk
Jun 30, 2009 at 2:47 pm

The tiny URL tweak has a major flaw: it queries the shortened url on every page load which slows down the page!

I’ve written a plugin which fixes this problem by caching the url – it can be found at the wordpress codex at:
http://wordpress.org/extend/plugins/shortcode-shorturl/
or directly on my blog:
http://hjacob.com/blog/2009/06/short_url_shortcode_wordpress/

Cam
Jun 30, 2009 at 4:20 pm

excellent post as always. the social links are difinitely helpful and gets rid of a plugin for me. fresh!

Stephen Winters
Jun 30, 2009 at 6:36 pm

Lots of great snipets to use. Thanks for the info!

Nick de Jardine
Jun 30, 2009 at 7:18 pm

Nice write up, very comprehensive!

Jeevan
Jun 30, 2009 at 9:50 pm

I used the related post hack and it’s not showing anything. It’s just showing the text “Related Posts”. I made two sample posts with the tag High Definition but the related posts are not being listed in either of the pages. Any help?

kittu
Jul 1, 2009 at 5:58 am

a good post for those who dont knw html n php..

Shane
Jul 1, 2009 at 6:52 am

Love your tutorials! Keep them coming.

IdealHut
Jul 1, 2009 at 7:19 am

Great post Nick!

TheToyDetective
Jul 1, 2009 at 7:43 am

A delicious set of code recipes, some of which will certainly be useful on my own WordPress blog.

karina
Jul 1, 2009 at 10:26 am

you’re design is very niice, can i get it? :D

Dario Gutierrez
Jul 1, 2009 at 11:10 am

Great list of tips.

Phil
Jul 1, 2009 at 11:13 am

The related posts code, when used in the loop, messes the comments up most severely if used on the single post page before the comment template!!

Timothy Read
Jul 1, 2009 at 1:46 pm

Its great to have all those in one place. Thanks!

BORABORA
Jul 1, 2009 at 2:15 pm

Great post!
Keeping up the good work…
Best wishes

ShustOne
Jul 1, 2009 at 5:09 pm

Entire post via: WpRecipies

Media Contour
Jul 1, 2009 at 6:03 pm

delicious wordpress recipes. very useful in many situations, especially the wp shortcodes.

Chong
Jul 1, 2009 at 9:31 pm

This is awesome script, i’m gonna use it….

Thanks Nick :)

Jennifer Song
Jul 2, 2009 at 12:10 am

These are really cool tips. The greatest of WordPress is that it’s the pioneer of all free CMS out there to advocate social networking.

Terence
Jul 2, 2009 at 12:11 am

This is awesome! thanks alot!

Jul 2, 2009 at 4:43 am

非常有帮助,谢谢!

Hendrik Jacob
Jul 2, 2009 at 8:00 am

The Short URL approach isn’t recommendable – its slows down the page (because it re-queues the Short URL every time).

Better try this plugin:
http://hjacob.com/blog/2009/06/short_url_shortcode_wordpress/

PS: sorry for shameless self promotion ;)

Chris Robinson
Jul 2, 2009 at 1:11 pm

Nice roundup of tips.

@Phil, you’ll need to paste the Related code after your comments include and you should be good to go.

Michael Lynch
Jul 2, 2009 at 3:32 pm

I can always rely on you for some excellent insight into the world of WordPress. You have definitely convinced me that WordPress deserves a lot of attention and you, among a few others, have inspired me to start blogging myself. Keep up the great work.

Adam Hermsdorfer
Jul 2, 2009 at 7:31 pm

It’s great to have these short codes in one place. One of my favorite things about WordPress is their community.

wordpressaholic
Jul 2, 2009 at 10:20 pm

you rock… totally bookmarking this page :)

hongmop
Jul 3, 2009 at 12:16 am

thank you so much!
It’s great!

Yatrik
Jul 3, 2009 at 5:00 am

Wow, awesome list. Thanks for posting.

Dainis Graveris
Jul 3, 2009 at 10:12 am

extremely useful article as always! WordPress is a huge trend, I am sure many people will evaluate this post and refference to it. At least I will, bookmarking!

Amjad Iqbal
Jul 3, 2009 at 6:56 pm

great list Nick. thanks for sharing!

jacko
Jul 4, 2009 at 3:45 am

google search engine wft?

Keith D
Jul 4, 2009 at 4:56 am

A great intro for someone like me who is new to WordPress.

I’m starting to look at WordPress because, as you say, lots of clients now want a CMS. And WordPress has lots of documentation and tutorials out there.

Roberto Blake
Jul 4, 2009 at 11:04 am

Great post, loved it, is great for the blogging Graphic Designer!

web design sussex
Jul 4, 2009 at 8:07 pm

Great article and website. With regards to other comments about wordpress as CMS i’ve been on a six month long journey testing different CMS tools. So far I have used the following. KenticoCMS, SilverStripe, Expression Engine & Word Press. My findings…. WordPress has been the most flexible and user contributed open source tool I have found and with recipe codes like this your can be assured your blog/website can have all the functionlity a high end drupal or joomla site has!

Sklep zoologiczny
Jul 6, 2009 at 10:46 am

Priceless tips! Thank for another great post.

yapidekor
Jul 6, 2009 at 1:48 pm

Thank you my friend …

RobShaver
Jul 6, 2009 at 3:34 pm

Three posts ago you wrote about Clixpy but the comments don’t work on that page. Why’s that?

The Clixpy demo did not reproduce my test with perfect fidelity, but I’m sure it could be useful. Bookmarked for future reference.

Thanks

Plastic Extruder
Jul 7, 2009 at 12:55 pm

This is great, I’m just getting into WordPress and this will be a big help…thanks.

Vidya
Jul 7, 2009 at 2:42 pm

Yest another great entry Nick. Fantastic!

Max.W
Jul 7, 2009 at 3:46 pm

Thanks for this, theres a few that I’m going to implement right now!

Thanks again.

CMHB
Jul 8, 2009 at 4:29 am

Great post, Nick. Some of these are going to be very useful to many. Thanks muchly for these.

少数派报告
Jul 9, 2009 at 10:11 pm

太好了。great! tks

CSS web designer
Jul 10, 2009 at 1:03 am

thanks some very good info. I just stated looking into WP and it has a tremendous potential

cutyland
Jul 10, 2009 at 3:49 am

Wooow… !! very nice post. And from now WDW is my favourite site.. :P go WDW go !!!!

Wordpressthemegenerator
Jul 10, 2009 at 4:58 am

Bookmarked for future reference. Thanks or sharing this kind of template.

Online Word-press Theme making at Website… Check it.

Guillem CANAL
Jul 11, 2009 at 8:21 am

Great Entry
Great Hacks
What else?

Alex Peterson
Jul 11, 2009 at 12:06 pm

Great snippets. Bookmarked. No doubt will come in very useful for future projects. Shame such great documentation isn’t provided on the WP site iteself.

Webagentur
Jul 11, 2009 at 3:15 pm

Thanks your this great tutorial. Any WordPress-User can take advantage of it!

gabe
Jul 11, 2009 at 5:25 pm

you are awesome to spend your time doing this, thanks. much appreciated.

om ipit
Jul 12, 2009 at 1:51 pm

this time i need this tutor and tips, cause i has been redesign my site. thanks for share. i will bookmark it.

Elizabeth K. Barone
Jul 13, 2009 at 9:40 am

This is an invaluable post. There have been too many times where I wanted to do something with WP but since I don’t have a strong PHP background I was completely SOL. Thanks to this post, I’ve discovered another WP resource — and several other resources by the same webmaster.

Thank you!

Shane
Jul 13, 2009 at 11:54 am

Fantastic post – most of these are either things I’ve wanted to do, or have just thought of using! Thanks a lot.

Nick
Jul 13, 2009 at 2:33 pm

The code about displaying Twitter follower count is NOT WORKING. I receive the following error: domdocument() expects at least 1 parameter, 0 given. This is in regards to the following line of code you have given: $doc = new DomDocument;

Does anyone know a fix?

Roberto
Jul 13, 2009 at 2:53 pm

Your handpicking wp recipes worked out well. As a newbie, this is a fantastic list especially the drop down!

RobertO
Graphic Design Schools.org

jeff
Jul 13, 2009 at 4:00 pm

Great Post… I am loving this cheat sheet..

SLKWRM
Jul 13, 2009 at 4:40 pm

Thanks a lot! Great site, great tips. From this moment on I’ll be coming here on a daily basis. When l’m more experienced, I’ll be posting my own tips, but at the moment I’m just a humble reader and learner.
From Russia with respect :)

Roy Vergara
Jul 14, 2009 at 10:42 am

thanks for the great guide!

naran_ho
Jul 15, 2009 at 5:20 am

Nice, great tutorial, great!

arhcamt
Jul 15, 2009 at 8:44 am

just what i need! many thanks!

wenzhentao
Jul 21, 2009 at 12:42 am

It is very useful, thanks.

wie bali
Jul 21, 2009 at 1:18 am

It is very useful for me , great tutorial

Julia
Jul 21, 2009 at 8:56 am

Thanks! Great post.

ragingfx
Jul 23, 2009 at 12:08 am

*Display Related Posts Based On Post Tags
Great no more plugins.. Thanks!

Amanda
Jul 23, 2009 at 7:58 pm

That’s awesome – you just saved me time and money! … Thanks so much!

disgenia
Jul 25, 2009 at 5:04 am

Nice code, of course! I will take something of it to my brand new (soon) blog.
Thanks and nice job!

Kris
Jul 26, 2009 at 5:10 pm

Very cool, thanks very much for the picks! The drop-down menu code is one I think I’ll incorporate into my blog!

~Krismom

maryjanez
Jul 29, 2009 at 4:16 am

awesome..
thanks for sharing.

acı cehre
Jul 29, 2009 at 12:01 pm

Very nice, but I have problems in practice

website design stoke
Jul 29, 2009 at 12:16 pm

I have been messing around with WordPress all day. Been one of them coders block days. Thanks for the excellent resources! How did I ever finish off my day without these great reads! Thanks!

Grégoire Noyelle
Aug 2, 2009 at 2:52 am

Great, thanks a lot !

CSS Showcase @CSSMadness.com
Aug 2, 2009 at 9:05 pm

Awesome WP recipes list! These would be useful for me in the future.

Barry Khan
Aug 3, 2009 at 2:24 pm

Wicked post, exclude category from search is really useful.

Kimber
Aug 5, 2009 at 9:09 am

Hey, thanks for the post. The short tag part is cool – can you elaborate further on that – more uses, how to integrate php or more custom code into the shortcodes…. I think it could have a lot of use but I’ve got to think of ways to use it to my benefit…

Kazim
Aug 5, 2009 at 8:02 pm

Hey, thats cool, I needed some of this codes. cheers..!

cennetevi
Aug 8, 2009 at 6:11 am

these are awesome!
thanks for putting in the effort to get this list together http://www.cennet.gen.tr

Don
Aug 8, 2009 at 11:18 pm

Thanks a lot for the code selected, i will check that website soon

Web Design Staffordshire
Aug 10, 2009 at 9:59 am

Great list, thanks for the share.

john
Aug 12, 2009 at 9:20 am

building a wordpress blog now… this is HUGE!

thanks!

Joshua Giblette
Aug 12, 2009 at 10:16 am

Great collection, thanks for the share. I’ll need to check out WPRecipes, definitely sounds intriguing.

Jesse Jarzynka
Aug 12, 2009 at 12:21 pm

Does anyone know of a way to list the most recent post from each author in order of date posted? I’ve looked everywhere for something like that.

xun
Aug 12, 2009 at 6:13 pm

this compilation of recipes are awesome! Boomarked :D

Mujtaba
Aug 12, 2009 at 7:49 pm

Awesome compilation , just what i needed

Textbox
Aug 14, 2009 at 9:28 am

Love the Twitter code snippets. We are just starting to utilize WP more and these will be very valuable to us.

Andrei
Aug 15, 2009 at 7:37 am

Excelent post!

Tandil Ajedrez
Aug 18, 2009 at 8:22 am

nice hacks, i try implement in my WP blog.

http://blog.tandilajedrez.com.ar

haberler
Aug 20, 2009 at 6:45 pm

“Automatically Insert Content In Your Feeds” its very useful thank you

Web Design Denver
Aug 21, 2009 at 11:41 am

Great list of code. I absolutely love working with wordpress, simply because of easy customization like this.

volkan
Aug 23, 2009 at 2:47 am

thanks , now a wordpress time

Dave Sparks
Aug 25, 2009 at 5:35 am

Excellent thanks for the collection – plenty of bits I was looking for!

Cookie Creative - Graphic Design Manchester
Aug 25, 2009 at 5:20 pm

Cool, this place keeps getting better and better. :)

Jonathan Bennett
Aug 28, 2009 at 2:53 pm

Thanks! I think I’ll find those Social Buttons useful. :)

Tampa Web Design
Aug 31, 2009 at 1:03 pm

I love it. Great info. I will bookmark this site as I will be redoing my wp blog in the near future. Thanks for the useful resource.

tatilkaynak.com
Aug 31, 2009 at 6:14 pm

woww its wonderfull!

lombok island
Sep 1, 2009 at 10:52 am

wow great tutorial. thanks

lombok island
Sep 1, 2009 at 10:53 am

i will try on my blog

this is awsome

keici
Sep 4, 2009 at 3:08 am

Where do you find these, they are really useful.

bagsin
Sep 10, 2009 at 8:11 pm

Great list of code. I absolutely love working with wordpress.

Blezx
Sep 14, 2009 at 6:02 am

thanks.. very useful

ian
Sep 16, 2009 at 7:48 am

this is what i want……..
thanx very much…

Cyrus
Sep 21, 2009 at 9:10 am

Great , 30 Flash-Based Photography Sites
Great article. CSS saved webdesign
Cyrus
Visit http://www.psdtoxhtmlcoder.com

andy
Oct 7, 2009 at 1:27 pm

The code you put in “Automatically Insert Content In Your Feeds” doesn’t insert anything in the feed output, it’s putting something under a single article only.
If this should work like promised in the title it must say:
if(is_feed())
(Wouldn’t make sense to ask people to subscribe to the RSS feed while they are reading it, or? ;-)

July
Oct 31, 2009 at 5:25 am

i will try on my blog

thepadi
Oct 31, 2009 at 12:16 pm

Ho ho.. Amazing.. I hope it will compatible to my theme.
Thank you.

Jacob Schulke
Nov 9, 2009 at 12:10 pm

Thank you. Needed this today, very helpful.

jeff
Dec 13, 2009 at 2:54 am

wow. that’s amazing. thanks!!

vincentdresses
Jan 6, 2010 at 1:59 am

喜欢你们的设计与技术,常来看看

ewitttas
Jan 11, 2010 at 11:32 pm

i love wordpress, i preferred as no. 1 cms and its ready made code make me more happy, thanks.

Tanzanian designer
Jan 19, 2010 at 7:39 am

loving this im really getting into wordpress, although i feel a little late.

JP
Jan 25, 2010 at 11:32 pm

Nice post! Here’s an article that shows how to automatically create bit.ly links for your posts: http://devmoose.com/coding/automatically-create-a-bitly-url-for-wordpress-posts

TheShadow
Feb 19, 2010 at 4:05 am

Thanks for the twitter counter and rss codes.i have successfully added those codes to my website

Asko
Feb 22, 2010 at 8:47 am

And another awesome pick! I would even call it a top 20.

sbobet
Mar 4, 2010 at 12:03 am

Thanks a lot! Great site, great tips. From this moment on I’ll be coming here on a daily basis.

Travis
Mar 8, 2010 at 3:37 pm

Thanks, great article’s and how to’s.. :)

köpek oyunları
Mar 23, 2010 at 3:42 pm

i love wordpress, i preferred as no. 1 cms and its ready made code make me more happy, thanks.

S.Smith at RealTaiji
Mar 26, 2010 at 9:35 am

Awesome list.

I found out that some of my plugins use too many cpu resources on my server, so I need to add code that reduces consumption. I look forward to trying these. And for all my searching, it’s rare to find so many in one spot.

Thanks.

lirik
Mar 30, 2010 at 11:20 am

thanks.. great tutorial..

Web Design
Apr 28, 2010 at 9:09 pm

amazing tutorial!!! thank you for sharing

Alex
May 3, 2010 at 8:13 am

Hi there, I’ve created my first wordpress powered blog integrated into my client’s site… with great help from Nick La’s themes and tutorials.

There’s one thing I am stuck on though, and wonder if anyone could help:

Now that my client has many posts, I want the main blog page to show just ‘summaries’ of each post (just like on webdesignerwall), so the user must click on ‘read more’ or ‘the blog post title’ to get the full post.

This means they are more likely to comment and it is neater!

Anyone knows what I need to do to get this to happen II’d be grateful.

Thanks and big shouts to Nick La and Web Designer Wall for the inspirtation and help.

บาคาร่า
May 7, 2010 at 8:06 am

nice post. thank for share article

PSD Box
Jun 18, 2010 at 5:46 pm

Absolutely useful. Thanx a lot.

ninel conde
Jul 2, 2010 at 1:50 am

WordPress is a wonder … Actually, I dont understand how people prefer blogspot

Thanks for the “recipe”
Ninel

Progs4u
Jul 6, 2010 at 11:01 pm

Thank you so much ..
You are very cool

cihip
Jul 20, 2010 at 8:49 am

WordPress Recipes Thanks.

gill robinson
Aug 9, 2010 at 7:38 pm

Wooo… this recipes make my day : ) thx

accessorize
Aug 19, 2010 at 10:46 pm

The content of the post is very well, from here I know much about sports knowledge, especially about the Puma training shoes. Here, I will introduce the puma lovers some good websites about puma with high price point.

ugg
Aug 21, 2010 at 1:26 am

Nice information, many thanks to the author. It is incomprehensible to me, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

Yemek Tarifleri
Sep 3, 2010 at 6:22 pm

would publish a very good recipe. I wanted to write here because the cakes, pastries, and a number of recipes here

Thanks

cheap balmain jacket
Sep 4, 2010 at 2:39 am

good!谢谢分享

Kevin Mahoney
Sep 13, 2010 at 8:47 am

Thank God you posted this…I needed to use this today for a client of mine. Love your site!

انفجن
Sep 21, 2010 at 7:30 am

good codes collection very useful thanks

Melvins
Nov 28, 2010 at 11:41 pm

Nice post shared by you. Thanks a lot for upgrade my knowledge.

Los Angeles Web Design

Henry Peise
Dec 24, 2010 at 2:42 am

Come and make a change for your lovely iphone 4 white!

Juno Mindoes
Dec 25, 2010 at 2:06 am

White iphone 4 Conversion Kit with impressive figure can easily be the focus of the crowd. I really want to get one!

oky
Dec 27, 2010 at 11:08 pm

idon’t know how to use it

Uçak Bileti
Jan 11, 2011 at 4:57 pm

uzulme oda başkasından gelmitşri

Filipe Valente
Jan 19, 2011 at 3:24 am

Any way to have the fan count of facebook page like this Display The Number Of Your Twitter Followers thanks

altın çilek
Feb 2, 2011 at 5:49 am

I always follow your site thank you

hcg damla
Feb 2, 2011 at 1:25 pm

Thank God you posted this…I needed to use this today for a client of mine. Love your site!

mlmleadsystempro
Feb 8, 2011 at 11:31 am

Great post.Thanks for sharing this post.Its really informative.

iş başvurusu
Feb 27, 2011 at 8:18 am

good recipes for wordpress. thanks

web designer philippines
Mar 2, 2011 at 2:43 am

nice recipes gonna use this with our clients. thanks for sharing.

Office in Singapore
Mar 17, 2011 at 2:41 am

This is great!!!This topic is truly relevant to my field at this moment, and I am really glad to discover your blog site.

Mark Hamilton
Mar 21, 2011 at 5:53 am

Cool post worth sharing with our team of Web Designer in London & yes nice compilation and thanks for that hard work.

Jamshed
Apr 20, 2011 at 1:29 am

nice recipes codes for wp
I like a lot may be I’ll use them in future

thanks

Mobile Themes World
Apr 28, 2011 at 4:56 am

Thanks for providing this bunch of tutorial list

panax clavis
May 16, 2011 at 5:53 am

I always follow your site thank you

SLR Camera Accessories
May 23, 2011 at 8:18 am

Those are great. I have already used a couple of those but I didn’t know about most of them.

Hostgator Kupon
May 23, 2011 at 11:25 am

This is very helpful article. Thank you. I think use some codes from here.

Neeraj
Jun 20, 2011 at 6:44 am

This is a good site to get valuable information. I got very useful information. Since I am a developer. I get very nice idea to implement word-press sites. My client is very demanding. He always try to developed some new in his site. But I get solution for this site.
Thank
Neeraj

ApniVideo
Jul 16, 2011 at 3:24 am

I was looking for an easy Site Maintenence Mode solution without the use of any plugin. Your solution works like a charm!

Thanks for sharing this

complex41
Aug 23, 2011 at 12:54 pm

And then he handed you the thirty-five 45

Darren Blancett
Aug 27, 2011 at 3:48 am

I¡¦ll right away seize your rss feed as I can’t to find your e-mail subscription hyperlink or newsletter service. Do you’ve any? Kindly permit me understand so that I may just subscribe. Thanks.

AbuBakar
Sep 19, 2011 at 6:03 am

I am over joyed, you solved many problems of mine. I was looking for filtering posts with specific custom fields and I got that thanks. Social sharing links are also good thing to know coz most of people add heavy plugins for such simple tasks.

junnydc
Nov 20, 2011 at 1:29 am

Hi,
I was looking for a php code to display the sticky post in a table format.
Problem is i dont know what to include in my header. Include what file ?

I will drop the php code inside my template.

mylife
Nov 23, 2011 at 6:51 am

Hello,

I am working on site in wordpress, where all the Jobs are pulled from the external jobs sites, such as monster, indeed, simplyhired. jobs are getting published on site randomly. but I need to explode the jobs titles after specific ascii character ” – ” for ex Sales and Marketing Manager – Mortons Steakhouse – San Francisco, CA and extract last jobs Address from the title and call it in location column.

Can somebody give me php function or any other way that should work automatically for this. the ” – ” is common for all jobs titles published on site.

waiting….

Thanks

Moliva
Dec 9, 2011 at 8:18 am

I will drop the php code inside my template.

Web Designer Philippines
Jan 28, 2012 at 12:06 am

Nice compilation of wordpress recipes codes. Thanks for sharing.

gwendel-showcase
Mar 21, 2012 at 1:07 am

hello, i just wanna ask if you could provide a code that will trim and show only the text beetween theText Here .. also, a code that will show the text which has a beginning of a word ‘Price’

e.g: post text… Price: $23.99…text text…

the output will be, $23.99

thanks in advance, cheers!

uçak bileti
Mar 21, 2012 at 4:00 pm

Thank yuu code

Kathy Smith
May 14, 2012 at 2:43 pm

Thank you so much! I found this very helpful.

Charles
May 18, 2012 at 9:43 am

Thank you so much.For this code.

Cole @ Four Jandals
May 24, 2012 at 4:37 am

Much appreciated mate. Was wondering how to code the twitter feed.

uxzeal
Jun 29, 2012 at 2:18 am

Thanks Buddy.. Quite Inspiring article

buy hcg canada online
Jul 4, 2012 at 10:25 am

Hello are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get started and create my own. Do you require any html coding expertise to make your own blog? Any help would be really appreciated!

DymoLabels
Jun 1, 2013 at 5:40 am

hi sir
i like this code
thanks for sharing this code
Thank you so much For this code

Post Comment or Questions

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.