Forums

How to show horizontal posts from specific category and add thumbnail... (5 posts)

  1. nyckidd
    Member
    Posted 4 months ago #

    hello,

    am using the code below to show posts in a horizontal manner, i would like some assistance to show posts from a specific category, the code is below;

    [code moderated - please use the pastebin]

  2. alchymyth
    The Sweeper
    Posted 4 months ago #

  3. nyckidd
    Member
    Posted 4 months ago #

    here is the code http://pastebin.com/zJ01ff0V i read the codex but am not sure where to place this code $query = new WP_Query( 'cat=4' );

    Thanks

  4. alchymyth
    The Sweeper
    Posted 4 months ago #

    where to place this code $query = new WP_Query( 'cat=4' );

    nowhere - the link was meant to point to the category parameters you could use in your existing query_posts() code.

    example:

    $args = array(
       'posts_per_page' => $posts_per_page,
       'paged' => $paged,
       'cat' => 4
    );
    query_posts($args);
  5. nyckidd
    Member
    Posted 4 months ago #

    Thanks that worked like a charm...for the thumbnail i need to add this wootheme code above the title ...

    thumbnail code is http://pastebin.com/6wzbgv04
    the title code is seen over here http://pastebin.com/zJ01ff0V

Reply

You must log in to post.

About this Topic

Tags