Top

daand on "PHP code in template tag"

May 28, 2010 by David Olsen 

What is i want to exclude the current post in the get posts code?

$postslist = get_posts(‘numberposts=1000&order=ASC&exclude=….&orderby=date&cat=’ . $cat_id);

In which case … should be the current post ID.

The current post ID template tag is; the_ID() I thought.

I would very much appericiate it when someone could explain how it works, because i dont want to bother you every time..

Thanks in advance!
Daan

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace
  • Share/Bookmark

Related posts:

  1. Flow01 on "Quick php problem (excerpt in meta tag doesn’t work)" Thanks for your quick response MichaelH! So, how do I...
  2. mariostella on "php query in post" Hi, I downloaded the plugin to execute php in post,...
  3. DrLightman on "[Simple Facebook Connect] Fan Box template tag" I really love this plugin and made my life easier...
  4. antr on "assign a template to all the post in a category" Which is the simplest way to assign the same template...
  5. donalyza on "Unique Single Post Per Category" I tried using this code inside my functions.php file define(SINGLE_PATH,...

Related posts brought to you by Yet Another Related Posts Plugin.

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





Security Code:

Bottom