Article Order in Category View

This support request was posted in Flatbase by apwallace

Request ID #6480 Resolved
  • Hello,

    I’ve changed the order of my articles. They are showing up properly in the Knowledge Base View.

    However, when you click on a Category, the order of the articles does not reflect the order I set. I basically just need the orders to be sorted by Title…even when the user clicks on a Category.

    Based on another forum post, I added the code below to the functions.php file….but, it had no effect on the Article order when in Category view.

    Thanks,
    Andy

    // filter the knowledgebase parser
    function nice_knowledgebase_article_order( $args ){
    $args[‘orderby’] = ‘title’; // date, rand, menu_order – check the codex for the different options
    $args[‘order’] = ‘ASC’; // ASC or DESC. You chose
    return $args;
    }
    add_filter( ‘nicethemes_knowledgebase_default_args’, ‘nice_knowledgebase_article_order’ );

    Juanfra Aldasoro

    Hello Andy,

    Thank you for writing. The order of the “archive” is set by default by WordPress. That piece of code you shared only affects the order of the knowledge base.

    We have created another code to alter the order of the articles within the archives, you can find it here: https://gist.github.com/juanfra/cf1979da9bff55518f14

    Best,
    Juan

    Thanks! Resolved!

    Thank you for the follow up.

    Have a nice day,
    Juan.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic is marked as resolved

Only the topic author can re-open this thread.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server