Conditional get_template_part
-
Hello,
I would like to take benefit of the new get_template_part() function but i’m stuck with a case.
On home page, i would like to do something similar to :
————————————
News
News loop————————————
Articles
Other articles loop (not news)————————————-
News is a category and into articles loop i don’t want news.
Into index.php file i would like to do something like :<section id="page"> <section id="news"> <h2>News</h2> <?php get_template_part('loop', '....'); ?> </section> <section id="articles"> <h2>Articles</h2> <?php get_template_part('loop', '....'); ?> </section> </section>
Is it possible to use the same loop with those conditions ? If yes, how please ? ??
Thanks.
br,
Benjamin.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Conditional get_template_part’ is closed to new replies.