• alst

    (@alst)


    Hi there,

    Have got a custom query for categories to lists posts in a parent category only without listing posts within that category’s sub categories.

    This works perfectly, however I am struggling to get these posts to list alphabetically rather than chronologically. Have tried the custom query string plugin which partially works in that it alters the number of posts value but it isn’t changing the alphabetically listing.

    Here is the code for my loop on a category page, any thoughts as how to force this to list alphabetically?

    <?php while (have_posts()) : the_post(); ?>
    <? if ((is_category()) && in_category($wp_query->get_queried_object_id())) { ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter alst

    (@alst)

    bother, code stripped, try this…

    <?php while (have_posts()) : the_post(); ?>
    <? if ((is_category()) && in_category($wp_query->get_queried_object_id())) { ?>

    Thread Starter alst

    (@alst)

    one last try,

    <?php while (have_posts()) : the_post(); ?>
    <? if ((is_category()) && in_category($wp_query->get_queried_object_id())) { ?>
    list hyperlinked the permalink then then title
    <!-- .post -->
    <?php } ?>
    <?php endwhile; ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Alphabetical Posts with custom category query’ is closed to new replies.