nachovidal
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: Loop categories wordpress10000 Thanks Alchymyth!!!
Done a little modification and now it works perfect 🙂Forum: Plugins
In reply to: Loop categories wordpress`<?php $all_cats = get_catgories();
foreach( $all_cats as $cat ) : ?>
QUERY AND LOOP WITH ONE CAT AT A TIME
<?php endforeach; ?>`Thanks for the reply!
How do you mean one loop at a time?!
the whole idea is to show al categories in a “list” including their posts and show the category title above the first post of the category.
Forum: Plugins
In reply to: Loop categories wordpressthis is the code
http://pastebin.com/embed_js.php?i=DhDe1TdHForum: Fixing WordPress
In reply to: loop categoriesnow i’m doing it like this, but i have to hardcode al the categories i want to show. I’m looking for a dynamic version! 🙂
<div class="panel" id="cat-item-6"> <?php query_posts('category_name=catname&posts_per_page='); ?> <?php if ( count( get_the_category() ) ) : ?> <h1 class="page-title"><?php $catid = $wp_query->query_vars['cat']; $cat_family = array_reverse(explode(',',get_category_parents($catid,false,','))); echo ($cat_family[2]) ? $cat_family[2].' ' : '';?><br/> <span class="bigga"> <?php single_cat_title(); ?> </span></h1> <?php endif; ?> <?php while (have_posts()) : the_post(); ?> <?php get_template_part( 'content' ); ?> <?php endwhile; // end of the loop. ?> <?php rewind_posts();?> </div>
Viewing 4 replies - 1 through 4 (of 4 total)