WordPress QuickTips

Here’s a little snippet of code that could come in handy: a total post count for a blog. Put this in your page to display the total amount of posts you’ve made:

<php the_author_posts(); ?>

This might come in handy when you’d like to display the total number of tutorials on a tutorial blog, sites indexed in a site gallery, etc.

Here’s another WordPress QuickTip that will save you some extra keystrokes. Whenever you want to link to an image, place in your site, etc, this little PHP snippet will save you the hassle of typing in the web address:

<?php echo(get_option('siteurl')); ?>

This will display the complete URL (http://www.yoursite.com) wherever you put this tag.

Post Revisions:

Stay up to date on WordPress news:

About the author:

Do you have your copy of The WPCandy Quarterly?

The Quarterly is our print magazine all about WordPress. It is released four times yearly (hence the name) and is filled to the brim with exclusive articles about WordPress, written by some of the brightest minds in the community.

Pre-order your issue today!

7 Responses to WordPress QuickTips

  1. Talking about the second tip, if your WordPress is installed in the root folder, you just need to put “/whateveryouwant”.

    For example:
    Homepage

  2. shane says:

    I am not sure you want to “save keystrokes” with that little trick for images, correct me if I am wrong, but what that call the database every time it runs, slowing down your site?

  3. Alain says:

    For the second tip… you can just do:

    <?php bloginfo(‘url’); ?>

  4. Lordo says:

    Nice post. Thank you for sharing that.

  5. [...] Post-Install Checklist SEO For WordPress : Part 1 How To Setup WordPress Locally On Windows WordPress Quick Tips Tutorial : Content For Admin Only 4 Simple Ways To Speed Up WordPress The WordPress Help Sheet The [...]

  6. WordPress QuickTips…

    A couple of handy snippets for use on your WordPress blog….

Leave a Reply

Please note that WPCandy is a moderated community.

 

Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>