Order the category post from older to newer (asc) (Nomad Demo)

Posted in: Newspaper
Post count: 28

Before I was using function.php for ASC using the codes below.. Well, modifying in every update, sure 🙁

add_action('wp_head', 'custom_change_posts_order');
function custom_change_posts_order() {
global $query_string;
if (is_category(array(33,34,35,36,37,38,39,44,48,49,51,53))) {
$posts = query_posts( $query_string . '&orderby=date&order=asc' );
}
}

Now, I’ve started to use “Nomad Demo” and this is not working.. I think I need to change something about POST LOOP but I don’t know how. Well, my knowledge about codes is minimal..

Post count: 20688

Hi,

The demo uses a cloud category template with a loop, so that code may not work. Maybe you used default category templates before and the code worked. I believe adding an option to sort the loop elements is already on our list of requests, so it may be added in coming updates.

Thanks

Post count: 28

First, thank you Simion for your answer, you guys doing great job.

It’s good to know “sort the loop elements” in your list but how I understand reading some documents or some post in this forum.. “from old to new” is not part of the wordpress philosophy. In that case, it won’t be my solution.

So, maybe you can provide some partial solution or some small codes.. that can be works for me (if it possible, sure).. I conform with this even if I need to modify after every update as before

Post count: 28

I forget to say “Maybe you used default category templates before and the code worked.” Yes, I was using the default category…

Post count: 20688

Hi,

I tried a couple of modifications in the cloud library plugin files for the loop, they don’t seem to work unfortunately. Sorry for the inconvenience. If there would be an easy and nested solution I would happily provide it to you.

Post count: 28

Thank you anyway, I understand that.. meanwhile I’ve just seen that in “sort order” of blocks exist “oldest post”.. that wasn’t before, last year, I mean..

Post count: 20688

Block, flex blocks and grids do have that sorting method, they always had it. I believe the same options will be implemented for the cloud loop element.

You could replace the loop in the category templates with a block (filtered by specific category and sorted by oldest), but that would require to create a template for each category. Sorry again for the inconvenience.

Post count: 28

Ok, thank you. I know there was the sorting method but, maybe I’m wrong, when I bought the themes, I remember there wasn’t “oldest” between options.

Anyway, I thought that you said, create a template for each category but a lot of works for me.. now I’m only waiting.. Thank you one more time for your attention..

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