Article Order in Category View
This support request was posted in Flatbase by apwallace
- apwallace October 26, 2015 at 10:06 am
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 October 26, 2015 at 2:14 pmHello 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
This topic is marked as resolved
Only the topic author can re-open this thread.