Tagged: x
-
AuthorPosts
-
May 11, 2016 at 6:25 pm #986719
gregwebb44ParticipantI’m trying to make it so that when someone clicks on a podcast category here: http://purplerocketpodcast.com/podcast/
…they’re taken to a list of the podcast episodes in ascending order (starting with episode 1). But right now, every time I publish a new post/episode to a category it displays the episodes in descending order. See screenshot attached.
Any help would be much appreciated!
May 11, 2016 at 11:27 pm #987130
Nabeel AModeratorHi There,
WordPress always displays posts in ascending chronological order. X theme does not modify this default behavior unless you’ve customized it. Even if you modify the order, X will still show the latest posts from the categories you select.
Thank you!
May 12, 2016 at 4:28 pm #988537
gregwebb44ParticipantSo there’s no way around it?
May 12, 2016 at 9:54 pm #988999
Rue NelModeratorHello There,
Because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// Change the order on category pages // ============================================================================= function custom_order_in_category( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( 'order', 'ASC' ); } } add_action( 'pre_get_posts', 'custom_order_in_category' ); // =============================================================================We would loved to know if this has work for you. Thank you.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-986719 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
