• Hey everyone.

    I just spent about an hour browsing the every forum possible and reading all the wordpress wiki but I can’t seem to figure out how to get my specific page to show a specific second section with different categories than being pulled on the home page.

    I can’t even change the one category shown on the home page.

    Currently my theme is pulling all campaigns to the home from home_campaigns.php template. Idk if its because its late and I’m burnt out or what.

    I appreciate any and all help.

    Problem:
    I need to add a second section in the container under hero slider. Show category (slug=examples id=28) a link (to learn more) then another category of campaigns (slug=examples2 id=16). See code below.

    <div id=”projects”>
    <section>
    <?php
    if ( fundify_is_crowdfunding() ) :
    $wp_query = new ATCF_Campaign_Query( array(
    ‘paged’ => ( get_query_var( ‘page’ ) ? get_query_var( ‘page’ ) : 1 )
    ) );
    else :
    $wp_query = new WP_Query( array(
    ‘posts_per_page’ => get_option( ‘posts_per_page’ ),
    ‘paged’ => ( get_query_var(‘page’) ? get_query_var(‘page’) : 1 )
    ) );
    endif;

    if ( $wp_query->have_posts() ) :
    ?>

    <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    <?php get_template_part( ‘content’, fundify_is_crowdfunding() ? ‘home_campaigns’ : ‘post’ ); ?>

    <?php endwhile; ?>

    <?php else : ?>

    <?php get_template_part( ‘no-results’, ‘index’ ); ?>

    <?php endif; ?>
    <?php wp_reset_query(); ?>
    </section>

    <?php do_action( ‘fundify_loop_after’ ); ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘2nd Section on home page to display post from a specific category’ is closed to new replies.