• Resolved Garet H.

    (@pagetopixel)


    Hello, I have noticed an issue since WordPress 6.X.X on several different websites. If you change the order of a category the order of the custom post type archive also changes. So for example, I have a custom post type called ‘products’. So if you visit /products/ all posts display. Within products there are several categories each with a corresponding page. If you re-order the products assigned to a given category, this also affects the order on /products/.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support beatrice12

    (@beatrice12)

    Hello @pagetopixel,

    Thank you for explaining!
    It might be an issue caused by a plugin or your theme.
    I recommend installing this plugin: https://www.ads-software.com/plugins/health-check/
    After you install and activate the above plugin it has a Troubleshooting mode which allows you to have a vanilla WordPress session, where all plugins are disabled, and a default theme is used, but only for your user – your visitors will still see the normal website.

    Go to its troubleshoot mode and?only activate Simple Custom Post Order ?and see if it works correctly with a?default WordPress theme (Twenty Nineteen for example) and no other plugins.

    Please let me know how it goes and what you find!

    All the best,

    Beatrice.

    • This reply was modified 1 year, 9 months ago by beatrice12.

    This topic will be marked as resolved due to inactivity. If you have any other questions please open a new thread.

    the support of ‘page-attributes’ is required to be first added to the post type generated manually, in order, to later call the ‘menu_order‘ directive. This directives allows the order to be done according to defined setting and not according to default post creation time.

    You may read more about it, here

    So the adding of the element to be controlled on functions.php would now look like this:

    function list_faq() {
        register_post_type('faq_questions',
            array(
                'labels' => array(
                    'name' => __('FAQ'),
                    'singular_name' => __('FAQ')
                ),
                'public' => true,
                'has_archive' => true,
                'supports' => array('title', 'editor', 'thumbnail', 'excerpt' , 'page-attributes')
            )
        );
    }
    
    add_action('init', 'list_faq');

    And the placing on the website of the fetched content would now look like this:

    <div class="tabcontent-box" id="id">
    	<ul class="ul-content">
    	<?php
    	$query = new WP_Query(array(
    		'post_type' => 'faq_questions',
    		'orderby' => 'menu_order',
    		'order' => 'ASC',
    		'tax_query' => array(
    			array(
    				'taxonomy' => $current_term->taxonomy,
    				'field' => 'slug',
    				'terms' =>	$current_term->slug
    
    			)
    		)
    	));
    	while ( $query->have_posts() ) : $query->the_post(); ?>
    		<li>
    			<a href="<?php the_permalink() ?>" class="tabcontent-link"><?php the_title() ?></a>
    		</li>
    	<?php endwhile; ?>
    	</ul>
    </div>

    And now… the magic returns, and moving by drag-and-drop of the elements with this plugin is back to working.

    You may also manually change the numbering of menu_order on the WordPress POST data base, according the post_type of the highlighted chosen by you name. This is required when you have more p

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category order’ is closed to new replies.