Alphabetizing Posts in category page with M10

Posted in: Newspaper
Post count: 6

I need to use list posts in alphabetical order in n category page with M10 (article display view)

Could you help me?
Where can i insert code:
‘orderby’=> ‘title’, ‘order’ => ‘ASC’

thank you in advance

Post count: 22421

Hello,

Our theme category pages use the loop.php file to populate the page with posts. This is where you will have to modify the code.
There is an alternative though. You could try to use a block from Visual Composer. There you can use the block settings to sort your posts to your preferred sorting option.
After the block is set use do_shortcode function to echo out the shortcode on that category page. The code must be added in category.php page here: http://screencast.com/t/mIrs3SDaaFez

I hope this helps.

Post count: 6

Thank you for your help.

i already insert:

<?php locate_template(‘parts/page-category-header.php’, true);?>
<?php
if (is_category (‘3993’) {
echo do_shortcode ( ‘ [sort=”alphabetical_order”] ‘ );
}
else {
locate_template (‘loop.php’, true);
}
?>
<?php echo td_page_generator::get_pagination(); ?>

but it doesn’t work. “Parse error: syntax error”

Post count: 6

problem solve 🙂

the code is:

<?php locate_template(‘parts/page-category-header.php’, true);?>
<?php
if (is_category (‘Artist’)) {
echo do_shortcode ( ‘ [td_block_11 category_id=”3993″ sort=”alphabetical_order”] ‘ );
}
else {
locate_template (‘loop.php’, true);
}
?>

thank you for your help

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.