Support » Plugin: Arconix FAQ » orderby shortcode won't change order of FAQ

  • Resolved akirchner

    (@akirchner)


    I’m trying to re-order the FAQ by slug instead of the default, but when I add the shortcode to the page, it doesn’t do anything. Neither does using ASC or DESC for the order. It always looks the same no matter what I put in there.

    What am I doing wrong?

    http://wordpress.org/extend/plugins/arconix-faq/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Gardner

    (@jgardner03)

    Hi akirchner,

    Thank you for using my plugin, and I apologize for the troubles. Unfortunately ‘slug’ is not a supported orderby value. You can see the values WordPress provides us here: https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    akirchner

    (@akirchner)

    How do I use this to change the order of the groups? I’m not as concerned about the question order (which is all its changing) as I am about the order of the groups. I don’t want to have to add numbers to their names though to make them go in the order I want.

    Plugin Author John Gardner

    (@jgardner03)

    If you have a specific order in mind, then set each FAQ shortcode to pull from a specific group. Let’s say I have groups A, B and C and I want the order to be B, A, C. I would create three shortcodes and specify the group I want to pull the FAQ’s from (using the group’s slug):

    [faq group="b"]
    [faq group="a"]
    [faq group="c"]

    Edit: clarified the text based on subsequent comments.

    akirchner

    (@akirchner)

    I’m assuming A, B and C are synonymous with the “Name” column for the groups? When I try that with the group name, it breaks it and nothing shows up, just blank.

    Plugin Author John Gardner

    (@jgardner03)

    Apologies, A, B and C are synonymous with the group slug. http://yourdomain.com/wp-admin/edit-tags.php?taxonomy=group&post_type=faq

    click the quick edit next to each group and grab the slug field.

    akirchner

    (@akirchner)

    That got it! Now it’s behaving just like I had hoped; thank you for your assistance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘orderby shortcode won't change order of FAQ’ is closed to new replies.