Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Forum: Plugins
    In reply to: Loop categories wordpress
    Thread Starter nachovidal

    (@nachovidal)

    10000 Thanks Alchymyth!!!
    Done a little modification and now it works perfect 🙂

    Forum: Plugins
    In reply to: Loop categories wordpress
    Thread Starter nachovidal

    (@nachovidal)

    `<?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 wordpress
    Thread Starter nachovidal

    (@nachovidal)

    Forum: Fixing WordPress
    In reply to: loop categories
    Thread Starter nachovidal

    (@nachovidal)

    now 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)