Themes

Mastering Your WordPress Theme Hacks and Techniques

March 16th, 2008

This is the first article in the four-part series, “Powerful guide to master Your WordPress”. Throughout this article, we’ll be focus on many WordPress Theme hacks, ideas, tips and useful tutorials you need to have ready in hand when developing WordPress websites.

We’ll keep this post updated during this month. As we’ll check your suggestions and feedback,
select the best, add them to this list and provide a direct link to the person who submitted
the suggestion.

So let’s get started and don’t forget to subscribe to our RSS-Feed to keep track on our next post in this series.

  • This is the Loop

    1)The Loop is perhaps the most important thing one needs to understand when customizing WordPress theme. Any HTML or PHP code placed between where The Loop starts and where The Loop ends will be used for each post. When WordPress documentation states “This tag must be within The Loop”, such as for specific Template Tag or plugins, this is The Loop.

    <?php if(have_posts()) : ?>
    <?php while(have_posts()) : the_post(); ?>
    // the code inside the loop
    <?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>
    • Further Readings On The Loop


      1)Modifying Individual Posts In The Loop- Sometimes Clients request things like Google ads being displayed after post #2, the top post having a differently colored background, only displaying the title for a few posts. You can’t do any of this inside a single Loop, so here’s how to use multiple loops to display lists of posts differently.How to use multiple loops to display lists of posts differently.

      2)Embed Google Ad in First WordPress Post- One of the more effective places to implement Google Adsense is after the first post, so you want to prevent your ad code from appearing after every single post, as WordPress would just loop and keep showing it. All you need to do is add this code inside the loop.

      <?php if ($count == 1) : ?>
      // Insert your Google AdSense code here
      <?php endif; $count  ; ?>

      You can also publish the advertisement after the second post or the third etc. Just change:

      “count == 1? to “count == 2?

  • Category Related Techniques

    The first step in modifying what happens when someone visits a Category page is to figure out which of your theme’s files is going to be used to display the posts. This is known as the Template Hierarchy.

    This diagram, tells us most of what we need to know about organization of WordPress themes.

    Change the number of posts displayed in Category Page.

    You will need to open index.php file and find the line below,

    <?php if (have_posts()) : ?>

    then add this line right below it:

    <?php if (is_category()) { $posts = query_posts($query_string . '&showposts=4'); } ?>

    Where number “4” is the number of posts you want to be displayed on every category page.

    Have a different template for specific Category

    So, if you want to make the Category whose ID number is 7 look different from what it is currently (and different from other Category pages), just create a category-7.php template file (or whatever your category ID is) in your current theme folder and customize it as you please. WordPress automatically checks for this, and will use the file if it exists. Please notice how we added the “-” and after it the id number of the category.

    Displaying single post pages differently in specific category

    For example, if you have a category called “News” and a category called “Tutorials” and you want the Stylesheet of the “News” category to be style1.css, and the stylesheet of the “Tutorials” category to be style2.css. Lorelle provides a simple solution by following the directions below:

    Open single.php file and delete all the content and add the following code

    <?php
    $post = $wp_query->post;
    if ( in_category('9') ) {
    include(TEMPLATEPATH . '/single2.php');
    } else {
    include(TEMPLATEPATH . '/single1.php');
    }
    ?>

    In the most simple terms, the PHP code issues a query that says: Check the post. If the post is in category ID number 9, display single2.php. If not in category ID number 9, display single1.php.

  • Conditional Tags

    Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches.

    Styling different categories: If you want to use certain stylesheet for specific category, all you have to do is add the code below to the <head> tag in your index.php file.

    <?php if ( is_category('15') ) {
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/cat-15.css"
    type="text/css" media="screen" />;
    <?php } else { ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"
    type="text/css" media="screen" />
    <?php } ?>

    Dynamic file content If you want to include a file that will only appear on the home page, Place this code in the index.php:

    <?php if ( is_home() ) { include ('filename.php'); } ?>

    Better SEO Titles for your pages

    <?php
    if (is_home()) { echo bloginfo('name'); }
    elseif (is_404()) { bloginfo('name'); echo ' - Oops, this is a 404 page'; }
    else if ( is_search() ) { bloginfo('name'); echo (' - Search Results');}
    else { bloginfo('name'); echo (' - '); wp_title(''); }
    ?>
  • Creating Navigation Menu

    Menus are an excellent way to create a menu of categories or Pages, highlighting specific areas of interest within your website.

    Dynamic menu highlighting is a way to give users a reference point with which to navigate. It is like the dot on the map that says “you are here”.

    Nick La created a dynamic highlight menu on Best Web Gallery by using the code below:

    <ul id="nav">
      <li<?php if ( is_home() || is_category() || is_archive() || is_search() || is_single() || is_date() ) { echo ' class="current"'; } ?>><a href="#">Gallery</a></li>
      <li<?php if ( is_page('about') ) { echo ' class="current"'; } ?>><a href="#">About</a></li>
      <li<?php if ( is_page('submit') ) { echo ' class="current"'; } ?>><a href="#">Submit</a></li>
    </ul>

    • Further Reading on Navigation Menu


      1)Creating Two-Tiered Conditional Navigation in WordPress- Here is a common navigational scheme, with parent pages on top and child pages (if they exist) on bottom.

      2) Smarter Navigation Menu Mike Cherim has explained how to get a smarter navigation menu using Conditional tags by offering post titles, archive dates, and category names instead of generic terminology.

      <!--Begin an unordered list the ID is for the bookmark, the class is for the style
          (so I can have other lists with the same styling as seen on RedScrubs.com)-->
       <ul id="nav" class="btn">
      
      <!--IF the current page is the 404 page, note the added error class-->
       <?php if(is_404()) { ?>
        <li class="current_page_item error"><a href="#">404 Error</a></li>
       <?php } ?>
      
      <!--IF the current page is the search results page-->
       <?php if(is_search()) { ?>
        <li class="current_page_item"><a href="#">Search Results</a></li>
       <?php } ?>
      
      <!--IF the current page is a single post-->
       <?php if(is_single()) { ?>
        <li class="current_page_item"><a href="#">Selected Article</a></li>
       <?php } ?>
  • Query Posts

    Query_posts can be used to control which posts show up in The Loop. All you have to do is place a call to query_posts() in one of your Template files before The Loop begins.

    Show posts from only one category If you want to display a certain number of posts in specific category

    <?php query_posts('cat=15&showposts=10'); ?>

    Here we want to display the latest “10” post in category whose ID is “15”.

    Exclude Categories From Your Home Page

    <?php
       if (is_home()) {
          query_posts("cat=-3");
       }
    ?>

    Retrieve a Particular Post

    <?php
    // retrieve one post with an ID of 5
    query_posts('p=5');
    ?>
    
    • Further Readings On Query Posts

      1) Query_posts redux- A helpful tutorial to list some of the arguments that you can pass to the query_posts() function.

      <?php
      query_posts('page_id=7'); //retrieves page 7 only
      query_posts('pagename=about'); //retrieves the about page only
      ?>
      
  • Get Posts

    get_postsis a simple tag for creating multiple loops to allow you list links of posts in different ways. For example if you want to display the last 5 entries, you use this code:

    <?php
     $previous_posts = get_posts('numberposts=5');
     foreach($previous_posts as $post) :
     setup_postdata($post);
     ?>
    <a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a>
    <?php the_content(); ?>
    <?php endforeach; ?>

    In the above code the variable “numberposts=5? tells WordPress how many posts to retrieve and populate the loop with. WordPress post formatting function, setup_postdata() automatically populates the required variables.

  • Post excerpts

    There are two WordPress template tags, the_content() and the_excerpt() used within the WordPress Loop to display the content of the post.

    Post excerpt allows you to display only the first part of your blog’s post, a block of content instead of displaying the full post. While many don’t know the real reason behind and just use it to make things more aesthetic, displaying excerpt has got many advantages both in the SEO and traffic area.

    The_excerpt() is used to force only excerpts to be seen on the multi-post pages. Also, HTML tags and graphics are stripped from the excerpt’s content.

    So here is how it works when using <?php the_excerpt(); ?> in the post:

    • 1) If the post uses both the_excerpt() tag and the explicit excerpt that is written in the textarea box on the write post panel,
      Display the explicit excerpt
    • 2) If the post uses the_excerpt() tag only,
      Display 120 words of the post

    And here is how it works when using <?php the_content(); ?> in the post

    • 1) If the post uses the <!- -more- -> tag to mark the ending post of the excerpt,
      Display this excerpt
    • 2) If the <!- -more- -> tag is not used,
      Display the entire post
    • Further Readings on Post Excerpts

      1) Display Post Excerpts Only in WordPress- A good way to ensure your posts don’t show up in suplemental results since Google can find them in various places – ensures that the excerpt is shown on all pages except the full post page.

      2) Use the More Tag on WordPress- Many readers prefer to have full posts on the homepage so that they can read the content right there, without needing to click around. A simple solution to accommodate both sides is to use the “more” tag on WordPress.

      3)Custom Excerpts for WordPress

      4)Things you should know when using post excerpt- Things you should be knowing and setting up when using post excerpt is described in this article: why use post excerpt?, Different ways of displaying post excerpt, Displaying excerpt on the frontpage, archives and search results page and Displaying full post in feeds.

  • Custom Fields

    WordPress has the ability to allow you assign custom fields to a post by adding extra information to the post which give your blog a lot of flexibility. Custom fields have a name and a value. The Key is the name of the custom field and the Value is the value you want to give to that name. You can display this information in posts, pages, sidebars, or anywhere on your site. WordPress remembers previously used custom field names and can be selected in the drop down list.

  • Getting Custom Field Values
     get_post_meta($post_id, $key, $single);
    <?php echo get_post_meta($post->ID, 'key name',true) ?>
    

    Where $post->ID to get a post’s ID, $key is a string containing the name of the meta value you want and $single can either be true or false. If set to true then the function will return a single result, as a string. If false, or not set, then the function returns an array of the custom fields.

  • Adding Custom Field in a post

    To illustrate, we’ll start with a very basic example— Lets assume you want to display the author name right below the title of the post and add a direct link to the author’s website. For starters, you’ll need to open a new post and add 2 custom fields with their respective values, see the image below.



    Now you can display these information inside your template file as below:

    <?php //get author_name (custom field) ?>
    <?php $author = get_post_meta($post->ID, 'author_name', true); ?>
    
    <?php //get author_url (custom field) ?>
    <?php $url = get_post_meta($post->ID, 'author_url', true); ?>
    
    <a href="<?php echo $url;?>"><?php echo $author; ?></a>
    

  • Writing Code in Your Posts

    Sometime you might need to add pieces of code like HTML, CSS, PHP, or javascripts in your post and make this code “looks” like code, but “doesn’t behave” like code. WordPress.com changes codes such as <, >, &, “, and ‘ into characters. For example, if you type:

    <? php query_posts('p=5'); ?>

    It will erased from your post when you save it. Or it will try to turn the codes into character entity codes, which can really mess some things up. So

    To make this WordPress template tag code appear, the code must be converted into character entities:

  • &lt;? php query_posts(&#39;p=5&#39;); ?&gt;
  • To Write Code in Your Posts so that it looks like a box of code which may be copied and pasted within other code or template file, you can use the <pre> HTML tag with <code> tag.
    • Further Readings On Writing Code in your Posts

      1)Signatures and Writing Code- Lorelle writes an amazing article on posting code in your WordPress.com blogs, listing the most common character codes (character entities) used in HTML/XHTML, PHP, and other programming languages. Also you need to check her other post “WordPress Plugins That Help You Write Code” sharing some of the WordPress Plugins that help you write code and equations in your blogs.

    • 2)Online Code Converters- There are several online converters that transform the text you type into the standard HTML code that every browser can recognize without altering the character encoding to help you change code into something that WordPress blog can display properly.
  • Organized and Structured Archives page

    There are many techniques to customize your Archive Index page. Some involve incorporation of plugins or PHP code to create customized lists of archived posts, and others provide more interesting ways of displaying your archives. You can display Archives By Year, month, categories, day, Weighted Categories, etc…

    The example below illustrats how to create an archives page listed by categories and months.

    <?php while(have_posts()) : the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <ul><?php wp_list_cats('sort_column=name&optioncount=1') ?></ul>
    <ul><?php wp_get_archives('type=monthly&show_post_count=1') ?></ul>
    <?php endwhile; ?>

    Where wp_list_cats displays a list of WordPress categories as links and wp_get_archives displays a date-based archives list.

    If you want to retrieve every single page (perhaps for a custom archive page or a full article listing), you can set this to -1.

    <?php
     query_posts('posts_per_page=-1'); //to return all the posts without pagination
    ?>
    

  • Permalinks

    Setting your desired Permalinks structure is the first thing you should do after installing your WordPress blog because search engines index your blog based on post URLs and if you change from one to another then you will loose your rankings. You can change the Permalinks setting through Admin > Options > Permalinks.

    WordPress has to option to use pretty links, turning the numbered links into sentences.

    So instead of the default ugly permalink

    http://example.com/?p=N

    Use the Pretty Link structure

    http://example.com/category_name/post-name
    or
    
    http://example.com/year/month/day/post-name

    • Further Readings On Permalinks Structure

      1) Configuring WP Permalinks- Weblog Tools Collection has a useful guide on setting up permalinks on your WordPress blog and how to set up a .htaccess file if you don’t have one.

      2) Understanding WordPress Permalinks- Which Permalink Structure Is the Best?

  • Identifying author(s) & guest comments and styling them

    Through intelligent use of CSS, you can exercise absolute control over author and guest comment layout, presenting the reader with comments so rich with style.

    1)How to highlight author comments in WordPress- By default, most themes have comments look the same. Matt Cutts show us a simple: instead of checking the author’s email address, check their user id to see if it’s the user id of the blog owner.


    2)How-to style WordPress author comments- Here you will be able to identify author(s) & guest comments under WordPress without the need for extraneous plugins, giving you some extra flexibility by adding code to check if the commenter’s email is the same as the email address of the blog’s author.


    3) Styling Your WordPress Comments- Here are three examples to design the guest comments which complements the rest of the site using: Gravatars, Speech Bubble and Alternating Arrows.


  • Separating Trackbacks from Comments

    Trackbacks are the messages displayed in the comments list whenever another blog links back to one of your posts. It is best if they are not mixed with the comments.


    1) Separating Trackbacks from Comments- The method described here will lift out all of the trackbacks, and then display them as a numbered list after the list of comments is finished.

    2) Managing Trackbacks and Pingbacks- This topic covers separating trackbacks/pingbacks from regular comments, and also how to remove trackbacks and pingbacks from a WordPress theme completely.

  • Custom 404 Page

    Reconsider the value of your 404 page by thinking of it as your home page. Think of it as a gateway to your site, you will find good ideas here:

    1)Customizing Your 404 Page- You can often retain the traffic that comes to your 404 page by either offering something funny to grab the readers attention or by offering a variety of methods for them to find the post they are looking for.

    2)Customize Your 404 Page- Here are some tips for improving your 404 page on your personal (or even professional) website.

  • Gravatars

    After you sign up for Gravatars service, every time you leave a comment at a blog with your valid email address, your image will appear next to your name, providing the owner has added a few simple lines of code.

    How to Setup Gravatars for your Blog – Plug-in Free!- This is a guide custom tailored for WordPress users to setup gravatars on their blog without using a plug-in

  • Worth Checking Techniques

    1) When Your WordPress Theme Keeps Reverting To Default- Have you ever been working on your WordPress blog’s design, when you refresh the page only to find that it’s decided to revert to the default theme?



    2) How to place a login form in the sidebar- Want to get your users log in through the front page, Small Potato’s tutorial will show you how.

    3) When Your WordPress Theme Keeps Reverting To Default- Have you ever been working on your WordPress blog’s design, when you refresh the page only to find that it’s decided to revert to the default theme?



    4) Adding Recent Comments To Your WordPress Theme- Displays recent comments in the sidebar without the need for a plug-in:


    5) Creating your home.php quite easily on WordPress- Two easy ways to use if you just want a static front page on your blog.


    6) Even Simpler WordPress Contact Form- A simple solution for all your contact form needs. All comments left with this form are displayed in your WordPress administration panel.


    7)WP Date Image Hack- Using dynamic images to replace the date entries of your blog post.


    8 ) Category Page Hacks- These 2 hacks will increase the usability of WordPress category pages by giving an index of posts instead of a paged overview, and by sorting posts by title instead of post date.


    9)Creating a “dynamic sticky”- When we need to have certain articles ’stay at the top’ longer than others.


    10)Show Category Images- How to add some simple PHP code to your WordPress template and make linked images appear instead of text for your categories in posts.


    11) Displaying WordPress Entries on static pages- A simple solution to include the date, headline, and excerpt of the latest entry from your Blog into your website static pages.


    12) Ajax Commenting- How to make your commenting system submit comment without reloading the whole page.

    13) Opening Links in New Windows- This hack is for those who want to open links in a new browser window and don’t want to type out target=”_blank” every single time.


  • Developing a WordPress Theme

    1)So you want to create WordPress themes huh?- A step by step guide to create a WordPress theme from scratch.


    2) Developing a WordPress Theme- Dezinerfolio wrote a tutorial on how to develop a WordPress theme, you will learn to convert your xHTML CSS site into a Compact WordPress Theme.


    3)How to create WordPress theme?- DevBox Wireframe WordPress theme, which is available for download on their site. This is basically a barebones theme that you can use to easily take a XHTML/CSS layout and convert it into a WordPress theme.

    4)Widgetizing Themes- Technical instructions on updating a theme for use with widgets.

The jungle is alive: Be it a collaboration between two or more authors or an article by an author not contributing regularly. In these cases you find the Noupe Editorial Team as the ones who made it. Guest authors get their own little bio boxes below the article, so watch out for these.

Tags:

107 comments for „Mastering Your WordPress Theme Hacks and Techniques
  1. Darren Hoyt on March 16th, 2008 at 7:55 pm

    Thanks for the links, guys. This is one of the best and most comprehensive WordPress overviews I’ve seen.

  2. ????? (Jason) on March 16th, 2008 at 8:04 pm

    Thanks for the tips. I’ve been meaning to seperate the trackbacks from comments, but never really got into doing it. After seeing the links here, I’ll have the information I need to modify my site design :)

  3. Myo Kyaw Htun on March 16th, 2008 at 8:16 pm

    Thanks for the links, you guy rocks here!

  4. Travis on March 16th, 2008 at 9:00 pm

    Fantastic list. I submitted it to Digg for you:

    http://digg.com/programming/Mastering_Your_WordPress_Theme_Hacks_and_Techniques

    Digg away folks!

  5. Chris on March 16th, 2008 at 9:55 pm

    Magnificent work. This would work great as a quick reference for WP beginners. Thanks.

  6. Lazy on March 16th, 2008 at 10:31 pm

    wow.. i`m really impressed.. what a great and interesting article about hacking and using wordpress / themes.. really great.. very good job!

    have a nice day

    Chris

  7. Noupe on March 16th, 2008 at 10:48 pm

    Darren,
    You have great tips on your site! I’m glad you found this post to be useful.

    Jason,
    I am glad you found what you was looking for, you can always separate trackbacks and comments in various way, using javascript is one of my favorite so they work as tabs.

    Myo Kyaw Htun,
    You’re welcome. Thanks for visiting and commenting.

    Travis,
    Thanks for submitting this article to digg, if you guys find it useful, digg it :)
    http://digg.com/programming/Mastering_Your_WordPress_Theme_Hacks_and_Techniques

  8. Yiyi Wang on March 16th, 2008 at 11:15 pm

    Extremely useful for a newbie like me!! burst into tears…

  9. Gray on March 16th, 2008 at 11:22 pm

    this is a dream come true article for theme-modders

  10. Aditya on March 17th, 2008 at 2:12 am

    This is really, really good and very comprehensive as Darren pointed out. Must have taken a lot of efforts. I must applaud you for compiling such a fine post. Cheers.

  11. Welcome to Paradise on March 17th, 2008 at 3:12 am

    I was always looking for article like this. I’m really impressed too. Thanks you.

  12. Mateus Neves on March 17th, 2008 at 4:36 am

    This post is the best post about WordPress for WordPress developers. Tanks!

  13. Miriam Schwab on March 17th, 2008 at 4:42 am

    That is a seriously amazing list of WordPress info! Thanks for putting it together, and thanks for linking to WordPress Garage!

  14. Mike on March 17th, 2008 at 6:32 am

    Great post, nice to have all this info in one place. One thing I didn’t see that I’m currently looking for is how to edit the RSS feeds for a WP site. I am using Custom Fields to display an image for each post and I want to include that image in the RSS feed too.

  15. Noupe on March 17th, 2008 at 7:11 am

    Thank you all guys, we are glad you found some useful stuff here.
    We really appreciate your feedback and don’t forget to suggest any useful WordPress theme hacks and techniques as we will keep this post updated during this month with a direct link to the person who submitted the suggestion.

  16. Tyler @ Building Camelot on March 17th, 2008 at 7:21 am

    WOW! Thank you. This is an incredible list of hacks. Glad my boss is out today. I’m going to be playing with my theme most of the day now!

  17. Noupe on March 17th, 2008 at 7:30 am

    Thanks Mike,
    There is a Plugin i saw few days ago that could allow you incorporate custom field values onto a feed.
    http://tinyurl.com/2uur7f
    Let me know if this fixed your issue.

  18. Sharon on March 17th, 2008 at 8:35 am

    This has got to be one of the clearest and most comprehensive overviews I have ever seen. I am bookmarking this – or I may just keep it open in a FF tab. Thanks a lot. :)

  19. paran on March 17th, 2008 at 9:18 am

    I translate the guide into Chinese, and would like get your permission.

    In fact, I have been translated and published the article, and I hope you will not mind.
    THX!

  20. Noupe on March 17th, 2008 at 9:33 am

    Thanks Paran,
    You got my permission :)

  21. Michael Martin on March 17th, 2008 at 10:04 am

    Really detailed and varied guide to WordPress there Noupe. Definitely a link to share with people still wondering what exactly they can get their WordPress to do. :D

  22. Mike on March 17th, 2008 at 10:33 am

    Thanks Noupe, looks like that plugin will do the trick. I’ll give it a try tonight!

  23. EJ on March 17th, 2008 at 11:11 am

    I’ve been using WordPress in my projects for years now and am very familiar with its internals… and yet you’ve highlighted some GREAT tips/tricks/plugins I previously had not known about. A job well done guys. You’ve made a new reader today.

  24. Daniel on March 17th, 2008 at 1:02 pm

    Thanks for the great resource, you’ve put everything i wanted to know in one place! I wrote a tutorial on how to use sliding doors in a WordPress theme (creating navigation menu) on my site a while back.

  25. samir on March 17th, 2008 at 1:46 pm

    whooo hooo what a list.I think i have been a noobie in wordpress till now.

    Lots of things to be done.bookmarking page straight away :)!!!

    Sam.

  26. brit on March 17th, 2008 at 5:36 pm

    The ‘styling different categories’ in the ‘conditional tags’ section of your post doesn’t work and i get a php error when i use it. (i’ve replaced category number and style.css with my own).

    Is there anything else we can do to make this work?

  27. Jermayn on March 17th, 2008 at 5:53 pm

    Love it guys!
    Great resource and have bookmarked it and will use frequently…

    Thanks

  28. Chris McCorkle on March 17th, 2008 at 6:02 pm

    Wow… excellent compilation here. Thank you for the hard work! Definitely bookmarked.

  29. Noupe on March 17th, 2008 at 10:30 pm

    Thanks Michael, your blog “Problogdesign” has many useful information related to WordPress that i wanted to share.

    Brit, did you create a new file and named it with your category name? Also what error did you get?

  30. Khairil on March 18th, 2008 at 5:20 am

    Not sure if anyone else had done this but I have 6 steps to host WordPress on multiple domains using advanced options in wp-config.php and domain pointer.

    Do check it out.

  31. Lucas Loyola on March 18th, 2008 at 8:31 am

    Nice post, i loved it!
    i’ll try do this tips.

  32. amy on March 18th, 2008 at 4:17 pm

    i love this post. can anyone tell me how i would (with query posts) exclude two or more categories from the home page? thanks in advance!

  33. Noupe on March 18th, 2008 at 4:28 pm

    Daniel, Could you provide a working demo of your example?

    Amy, regarding your question of excluding 2 or more categories using query post you can use the code below:

    <?php
       if (is_home()) {
          query_posts("cat=-1,-2,-3");
       }
    ?>
    • Jenny on June 13th, 2010 at 8:20 am

      Awesome this is exactly what I was looking for :D

  34. amy on March 18th, 2008 at 6:00 pm

    Thank you for your quick response. I tried that before you responded and it doesn’t work — it only excludes those posts in the first category ID listed (ie 1 in your example, but not 2 and 3). I have manipulated the order of the categories and found this to be true each time. Any other ideas?

  35. klou on March 18th, 2008 at 7:29 pm

    thank you so much.

  36. ShayaX on March 19th, 2008 at 2:49 am

    Tnx . . . A Lot! :D

  37. Noupe on March 19th, 2008 at 4:09 pm

    Ok Amy,
    Try this one, i have tested it and it works fine. Just don’t use the usual start of the loop code and use the code below:

    
    <?php if ( have_posts() ) : query_posts($query_string .'&cat=-13,-26'); while ( have_posts() ) : the_post(); ?>
    

    Also there is a nice plugin that you can use to do this job for you “Advanced Category Excluder”, The main goal of this plugin is to hide some unwanted categories, from defined parts of the blog like your home page, your feed, etc…
    You can download it at the link below:
    http://tinyurl.com/2mtozg

  38. DigitaleWelten on March 21st, 2008 at 8:53 am

    Very good tutorial! I’ll keep coming back.

  39. Mithun on March 21st, 2008 at 9:08 pm

    Much helpful
    Thanks Thanks..

  40. Lucifr on March 22nd, 2008 at 12:30 pm

    Great job, Noupe!

    I’m trying to translate this post into Chinese so that I can share your useful tips with my friends. I don’t know if this is Ok for you? I will put a link pointing to your original post and statement that mine is just a translation of your post.

  41. NBWeb.it - Nicola Boschetti on March 22nd, 2008 at 3:46 pm

    Wooow!
    Such an astounding guide!
    Thank you very very much, can’t wait for the next articles :)

  42. lorenza on March 23rd, 2008 at 6:42 am

    Thanks for share this tips, i use all in my blog

    compliments for your job.

    L.

  43. Jon on March 25th, 2008 at 10:27 am

    What an aawesome list! Bookmarked and Stumbled.

    I came up with a WordPress hack that allows you to import links into your WordPress blogroll by category, rather than having them dumped into the default category. It saves time if you have a lot of links and use a lot of link categories.

  44. Carlo on March 26th, 2008 at 2:22 pm

    thanks for the post. i hope to read some more.
    Best regards from Sebbi

  45. God I'm Hungry. on March 28th, 2008 at 3:35 pm

    WordPress is entirely to strict, blogger doesnt give a Crap. I will do blogger until i get more design skills. Great blog though.

  46. Jacky on March 29th, 2008 at 1:38 am

    Great post.Thanx a lot

  47. eWreckers on March 30th, 2008 at 2:40 am

    excellent list…I will be coming back a lot. Thanks!

  48. Justin on March 30th, 2008 at 9:56 am

    Excellent tutorials!! Thanks for your great effort, really appreciated. Bookmarked and can’t wait for your next post.

    Cheers,
    Justin

  49. James on March 31st, 2008 at 4:52 am

    good read thanx for taking the time to write it

    very interesting

    gr8 list and tips there

  50. Stronghold Crusader Extreme on April 10th, 2008 at 12:57 pm

    Great tips, i found all information i was looking for, i will use some of them.

  51. aniss on April 16th, 2008 at 3:32 am

    thanks so much :)

  52. David on May 14th, 2008 at 8:01 pm

    Is there a hack that would allow me to change the theme of a WP Blog without doing it through admin?

    If I wanted to show a client three different WP themes all running off the same DB (as per theme viewer) but not have to do three installs is that possible?

    Can’t see any reference in DB to them used or no mention of them in the PHP code.

    Thanks.

  53. Gaj on May 31st, 2008 at 2:24 am

    Hi there,

    Great posts thanks, I want to start using exceprts but ther are a bit boring at the moment on my site. How can I make an image appear like on your blog, can you point me in the right direction?

    Cheers,
    Gaj

  54. Richard Ellender on June 25th, 2008 at 6:22 am

    Thanks very much. I especially like the tip to display the trackbacks after the comments.
    Keep up the good work!

  55. Toure on July 13th, 2008 at 10:55 pm

    Hello
    Thanks for the great tutorials.
    My question is could you please write a plugin that can simply help to upload images and manage them to a specific folder withing wordpress where we can call the image files for the excerpts.
    It think wordpress files upload sucks (I don’t even know if there is one beside uploading directly images for the articles.
    Please help us with a plugin or guidance or how o do it withing wordpress without using any external program.
    Again thanks and I am gonna follow this post for answer

  56. Onyeka on July 16th, 2008 at 4:56 am

    Great compilation!

  57. Patrick on August 6th, 2008 at 4:18 pm

    Wow. I was just looking for a bit of help on manipulating Comments pages, but I stumbled on a gem with this. Thanks for the post!

  58. Jonathan Concepcion on August 6th, 2008 at 4:28 pm

    Flawless Article!

  59. K.K.Shankar on August 6th, 2008 at 8:49 pm

    Great article.

    Good work. Keep it up.

  60. Tom on August 7th, 2008 at 1:21 am

    Great guide, there is almost everything you need to customize a WordPress theme.

  61. Santhos on August 9th, 2008 at 1:33 pm

    Stunning article! I’m kind of new to webdesign using wordpress so this is some very usefull information to me. Thanks a lot!

  62. Andre Thomas on August 13th, 2008 at 11:06 pm

    This is an awesome post. I could use a lot of these right now. Thanks, I shall check out the rest of the site.

  63. perk1z on August 17th, 2008 at 10:05 am

    great articles … thx

  64. Sarbjit Singh on September 5th, 2008 at 2:44 am

    Amazing..

    Very helpful

  65. Sarpras on September 5th, 2008 at 7:42 am

    great articles

  66. Hindsuismnet on September 18th, 2008 at 4:59 am

    That is a seriously amazing list of WordPress info! Thanks for putting it together at one spot.

  67. Moe on September 20th, 2008 at 5:21 am

    Brilliant ,this will help me fixing my wp site .
    thanks for sharing :)

  68. blogsarticle on September 25th, 2008 at 5:52 pm

    Very helpful

  69. Andrei on October 8th, 2008 at 3:08 am

    This post is amazing! Thank you very much!

  70. Icon on October 21st, 2008 at 2:57 am

    Excellent ! This article is very handy and helpful.
    It’s time to make your own theme. :D
    Thanks.

  71. mixey on October 30th, 2008 at 10:58 am

    Awesome! This collection is priceless

  72. Premium Wordpress Theme on November 12th, 2008 at 1:44 pm

    Great List. Very useful. Ie will destroy us all!

  73. Bugjee on November 19th, 2008 at 9:33 am

    i need more time for seriously read this article

    thanks
    \ /
    “(-_-)”

  74. Fred on December 9th, 2008 at 6:10 am

    Thanks
    ;)

  75. Luke on October 13th, 2009 at 4:04 pm

    Thanks for this great list of resources and ideas. Just getting to grips with theme design – that’s a load of info here to help me on my way!

  76. wptidbits on October 19th, 2009 at 6:00 pm

    Some of these tips have already been state in other sites. Anyway, there are also many that aren’t. Good job. Keep updating us with latest info. I really like this post. Simple and useful. Thanks!

  77. Cristian Bosch on October 27th, 2009 at 4:13 am

    A truly great list for WP developers and designers. I’m bookmarking it and will surely return for reference. Thanks!

  78. SWP on November 1st, 2009 at 1:55 pm

    Man so much stuff to know about WordPress. Time to get to work.

  79. naoufal on November 4th, 2009 at 1:00 am

    thnx

  80. Dee on November 9th, 2009 at 10:46 am

    You have no idea how mush this helps in making sense of WP theme making. *hugs you* A thousand ‘thank you’s!

  81. Chuck on December 5th, 2009 at 4:43 pm

    Fantastic resource post. The less plugins the better, and with the information you provided, I need to get to work! Thanks for the great post.

  82. Jean-Patrick Smith on December 11th, 2009 at 6:34 am

    Awesome, you’ve been tweeted!

  83. Ashutosh on February 10th, 2010 at 8:19 am

    I must say that it is one of the most useful wordpress guidances I have seen past five years.I am sure millions across the globe will be benefited with such rich resource base.

  84. Felix on February 22nd, 2010 at 4:36 pm

    Extremely good information. I was looking for a way to show images on search and index pages and found the info here. 5 stars *****. Thanks a lot!

  85. Felix on February 22nd, 2010 at 4:37 pm

    Extremely good information. I was looking for a way to show images on search and index pages and found the info here. 5 stars. Thanks a lot!

  86. Blancheys on March 11th, 2010 at 3:50 am

    Big help indeed. Subscribed.

  87. mazznoer on April 9th, 2010 at 9:21 pm

    Great article, very useful…

  88. adsl viettel on April 11th, 2010 at 9:20 pm

    Extremely useful for a newbie, thanks for your sharing

  89. Website Design on May 10th, 2010 at 2:52 pm

    Nice tutorial… covers everything one would need for basic customization.

    Would like to see more

  90. Sams0n on May 17th, 2010 at 9:10 am

    I use wordpress a lot on my websites.
    I love it so much now and i find it very easy to use.
    This tweaks is very useful as well.

  91. babe on June 23rd, 2010 at 5:11 pm

    Hey friend, thanks for sharing all these dev tuts, hacks..
    Examples are great.

  92. Kain on September 3rd, 2010 at 12:49 am

    Hi! Thanx for your site, very helpful! I need some help, i want to optimize my category page, to have only titles displayed (and eventually an extract of the post content). I’m a beginner!

  93. Rohit Club on September 25th, 2010 at 8:03 pm

    wow… thanks 4 info in details…

  94. Ryan on December 12th, 2010 at 4:53 pm

    Props to you, I’ve learned a lot of techniques from your post. Thanks!

  95. Carmen on January 14th, 2011 at 11:30 am

    Extremely good information. I was looking for a way to show images on search and index pages and found the info here. 5 stars. Thanks a lot! Hotel

  96. Chiropractor Hoffman Estates on January 25th, 2011 at 12:14 pm

    Awesome Work! its really helpful Thanks

  97. danny on August 12th, 2011 at 5:32 pm

    I have Installed query posts by Justin Tadlock inside a widget and have excerpts showing up on home page; and the full content post on another. however when you click on the link for the posts I get the same full post content on every full post. any suggestion for a fix

  98. Ameet Ranjit on August 23rd, 2011 at 12:16 pm

    That is a seriously amazing list of WordPress info! Thanks for putting it together at one spot.

  99. sarah on November 15th, 2011 at 7:26 pm

    so I’m somewhat new to all of this and in the about author section of my page, whatever text i enter is showing up in a foreign language, any help to fix this would be greatly appreciated! thanks ahead of time!

  100. Michael Rurup Andersen on February 4th, 2012 at 3:15 pm

    Great advice amoung all those links – thanks for sharing.

  101. Zhu on February 14th, 2012 at 4:26 am

    This is one of the best reference posts ever. I had it bookmarked when it was first published and again, today, as I was updating my theme, I used it again. Thank you!

  102. Linkon on March 20th, 2012 at 6:00 am

    A great tutorial. I found many good things that I can apply for my site I’ve developed with wordpress. Thanks a lot.

  103. gwendel-showcase on March 21st, 2012 at 7:40 am

    hello, i just wanna ask if you could provide a code that will trim and show only the text beetween [p] theText Here [/p].. 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!

  104. kasireddy ch on August 3rd, 2012 at 7:03 am

    The web site you are trying to access:
    atozmp3.net/
    is listed as a site within the category:Hacking
    and is not accessible because of one of the following reasons:

    1. Organisation’s Internet Access Policies
    2. You have not logged in to the Windows domain
    3. You don’t have permissions to access Internet

    How to access all sites in my PC….

  105. ownsa on December 12th, 2013 at 9:24 am

    good things that I can apply for my site I’ve developed with wordpress. Thanks a lot.