• Resolved zash20

    (@zash20)


    In my site i used this shortcode [knowledgebase-one taxonomy="post_tag" include="71,73,74,75,76,72"]

    The problem is the tag or category segments are showing only ascending order.
    But I want it appear order by the included id listed above.

    Is that possible?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter zash20

    (@zash20)

    I could not wait, so I look into the code and changed the category query array code like this in the plugin, and it worked.

    $vskb_cat_args = array(
    	'taxonomy' => $vskb_atts['taxonomy'],
    	'include' => $vskb_atts['include'],
    	'exclude' => $vskb_atts['exclude'],
    	'orderby' => 'include',
    	'hide_empty' => $vskb_atts['hide_empty']
    );

    Just added the line,'orderby' => 'include',

    So that I can sort the category or the taxonomy according to include.

    Do you have any better solution for this?

    • This reply was modified 4 years, 10 months ago by zash20.
    • This reply was modified 4 years, 10 months ago by zash20.
    Plugin Author Guido

    (@guido07111975)

    Hi,

    The problem is that I’m already using the orderby attribute for the post args, so I cannot use it for the cat args as well, because when someone uses the orderby attribute in his or her shortcode this will cause unexpected behavior. So I think the only way right now is to change it in the code of your plugin.

    Guido

    Thread Starter zash20

    (@zash20)

    Thank you very much for the confirmation. I am ok with editing the code.
    Best wishes and thanks for this great plugin.

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