• Resolved butterflyherder

    (@butterflyherder)


    Greetings!

    I’ve been trying to get support from iThemes, but they’ve yet to respond. I’m on deadline, so I hope somebody here can help.

    The code below feeds into a specific area on my client’s website. CURRENTLY, it feeds ALL of the blog posts.

    I want it to feed only CATEGORY 12.

    What part of this code do I need to edit to make this happen?

    <div id="pop" class="hiddencontent">
    
    		<?php $my_query = "showposts=4"; $my_query = new WP_Query($my_query); ?>
    
    		<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    		<h5><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h5>
    
    		<p><?php the_time('F j, Y') ?><br />
    
    		by: <?php the_author_link(); ?> &bull; <?php the_category(', ') ?></p>
    
    		<?php endwhile; ?>

    Thanks in advance!
    Cynthia

Viewing 3 replies - 1 through 3 (of 3 total)
  • You need to edit your WP_Query parameters– this bit, $my_query = "showposts=4";. The Codex page has exactly what you need right here (WP_Query takes the same parameters as query_posts). Your query should end up looking something like $my_query = "showposts=4&cat=12";

    Thread Starter butterflyherder

    (@butterflyherder)

    Awesome! Thanks so much!

    chittala

    (@chittala)

    sorry for adding a new topic. i want to add a feed in my jtabber section in the ithemes wordpress theme. plz let me know how do i do that. thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need SINGLE CATEGORY feed… currently have FULL blog feed… help?’ is closed to new replies.