• Hi there,
    I am looking to change the order of how my categories appear. I have 3 posts (all of them set as a category called ‘Featured’), I then assign different more specific categories (business, food, music).
    On my blog page the categories appear as:

    Featured / food
    Featured / music
    Business / Featured

    I want to change the category order (which I think is alphabetical so that it appears as featured / business and not the other way around).

    I tried downloading the “Category order” plugin, but this did not work.

    Thanks,
    Ollie

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi brazier10. If you post a link to your site one of us can take a look at it. Thanks.

    Hi,

    I don’t understand your issue.

    On the homepage or blog (if you are using a Posts page ), the posts are listed according to most recent posts, which is the same order as what you see in your WordPress admin -> Posts -> All Posts

    It’s not listed according to categories.

    If you want to change it’s order, you can use the following plugin.
    https://ww.wp.xz.cn/plugins/post-types-order/

    Thank you

    Thread Starter brazier10

    (@brazier10)

    Hi guys, thanks for your reply
    link to site is http://www.outandaboutmag.co.nz/

    I’m not worried about the post order, i’m just worried about the category order (I believe it is done alphabetically).

    I have 3 test posts on the home page and you can see the categories on the posts in the following orders
    Featured / food
    Featured / music
    Business / Featured

    I want the Business article to be categorized with “Featured” before the word ‘business’. Does that make sense?
    Not sure if it’s possible at all.

    @brazier10 – Are food, music and Business sub-categories of the Featured category? Or are they main categories?

    Thread Starter brazier10

    (@brazier10)

    Hi @bdbrown, thanks for getting back to me, They are all main categories.

    Just wanting to know if theres a way to organise them for which order they appear in, there is a plugin but it doesnt seem to work with this theme.

    Hi,

    The theme uses the WordPress function the_category to show categories.
    https://codex.ww.wp.xz.cn/Function_Reference/the_category

    Don’t think there is a parameter for ordering category.
    Maybe bdbrown has a custom solution. 🙂

    Thank you.

    Well, yes, I think I might have one. Give this a try:

    1. Change your food, music and business categories to be subcategories under the Featured category.

    2. On your posts, leave the main Featured category unchecked; only check the subcategory.

    3. Copy the content.php theme template file from the parent theme to your child theme.

    4. In the child theme file find this section about 2/3 of the way down the file:

    <div class="post-meta group">
    	<p class="post-category"><?php the_category(' / '); ?></p>
    	<?php get_template_part('parts/post-list-author-date'); ?>
    </div><!--/.post-meta-->

    5. Change the “post-category” line to this:

    <p class="post-category"><?php the_category(' / ', 'multiple'); ?></p>

    This will cause the categories to be displayed in parent/child order with a separate link to each category.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Category Order’ is closed to new replies.