WordPress.org

Ready to get started?Download WordPress

Forums

Arconix FAQ
[resolved] orderby shortcode won't change order of FAQ (7 posts)

  1. akirchner
    Member
    Posted 1 year ago #

    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/

  2. John Gardner
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. akirchner
    Member
    Posted 1 year ago #

    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.

  4. John Gardner
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. akirchner
    Member
    Posted 1 year ago #

    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.

  6. John Gardner
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  7. akirchner
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.