Change RECENT artcile block to SINGLE category

Love the BuddyPress Corporate theme. Only one small problem remains. I would like to change the Left Column Article Block to ONLY display articles from a particular category.

Could you please direct me on which .php file contains this information and how to modify the code to only display a single category.

Thanks,

DMorrocco

  • dmorrocco
    • WPMU DEV Initiate

    Anybody?

    Found this in home.php. Is this what I’m looking for? Can you please explain how to modify to allow for only recent articles from a SINGLE category to be populated in the home article block?

    //insert your category name

    $my_query = new WP_Query(‘category_name=’. $the_home_featured_cat . ‘&’ . ‘showposts=’ . 10);

    while ($my_query->have_posts()) : $my_query->the_post();

    $do_not_duplicate = $post->ID;

  • dmorrocco
    • WPMU DEV Initiate

    Is they any support on this forum? Is there a way to contact the template author? This is a very basic request. Would be easy, but the code in the template is not what I’m used to. Just want to limit the FEATURED ARTICLE BLOCK on CORPORATE to a single category?

    Anybody?

  • dmorrocco
    • WPMU DEV Initiate

    Found this in template-blog.php. Am I getting warm?

    <?php do_action( ‘bp_before_blog_home’ ) ?>

    <?php $page = (get_query_var(‘paged’:wink:) ? get_query_var(‘paged’:wink: : 1; query_posts(“category_name=News&showposts=10&paged=$page”:wink:; while ( have_posts() ) : the_post(); ?>

    <div <?php if(function_exists(“post_class”:wink:) : ?><?php post_class(); ?><?php else: ?>class=”post”<?php endif; ?> id=”post-<?php the_ID(); ?>”>

    Changing the category_name does not work, so maybe not. A little direction? Someone, please?

  • Richie_KS
    • HummingBird

    hi dmorrocco

    you just open the thread in less than 12 hours top so timezone on support

    maybe different:slight_smile:

    i see you open a jobs in wpmu-jobs…

    wise decision…since the request maybe need some custom hacking on the bp-corp homepage

    blog entries…

    cheers