fbpx

Categories in Dropdown

HomeTopicsSupport forumCategories in Dropdown
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13936
    Avatar
    techtone
    Participant

    Hi,

    I can’t seem to find a way to change category sorting for the category dropdown (search widget) in the header.

    It doesn’t show the way product categories has been sorted. Any way for me to change that?

    Thanks

    #13937
    Artem Temos
    Artem Temos
    Keymaster

    Hello,

    Try to edit the file templates/search.php and replace the following code

    wp_list_categories(
    	array(
    		'title_li' => false,
    		'taxonomy' => 'product_cat',
    		'use_desc_for_title' => false,
    	)
    );

    with this one

    wp_list_categories(
    	array(
    		'title_li' => false,
    		'taxonomy' => 'product_cat',
    		'use_desc_for_title' => false,
    		'orderby'  => 'meta_value',
    		'meta_key' => 'order', // phpcs:ignore
    	)
    );

    It will be also fixed in our next theme update.

    Kind Regards

    #13938
    Avatar
    techtone
    Participant

    I see. Will wait for the next update. Thanks.

    #13939
    Artem Temos
    Artem Temos
    Keymaster

    OK, you are welcome. Feel free to contact us if you have any questions.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Sign in

No account yet?

Create an Account