• Create a code to show all post of each of my categories:

    <li>
        <a>La Boca</a>
        <ul class="sub-menu">
            <?php
            query_posts( array ( 'category_name' => 'La Boca', 'orderby' =>         'menu_order', 'order' => 'ASC', 'showposts' => -1 ) );
            while ( have_posts() ) : the_post(); ?>
            <li>
                <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
            </li>
            <?php endwhile;wp_reset_query();?>
        </ul>
    </li>

    The problem with this code is that I have to be repeated for each of the categories, there is a way for all categories will be automatically loaded? for example with a variable where it says “category_name”?

    Thanks for the help

  • The topic ‘query_posts: display all categories’ is closed to new replies.