generateblocks icon indicating copy to clipboard operation
generateblocks copied to clipboard

Drag and drop to order with the "Include posts" query parameters

Open thisbit opened this issue 3 years ago • 1 comments

Description

The include posts param is great. I have a lot of clients that will love this to manage their homepages for instance, when they want to pick and choose what to show. So far I used ACF to handle these requests, using theit post object field. One feature that ACF post object field has and GB "Include Posts" does not, is ordering manually. In ACF post object, you can drag and drop posts into the order you want them, right there in the field, what ever the order in the field, will be the order on the front.

Steps for testing

  1. Insert query block.
  2. Add wuery parameter
  3. Choose include posts
  4. Choose individual posts
  5. Grab the last post in the field and try draging it to be the first
  6. Does not work

References:

  1. Create the ACF (free version is fine) field group and create the post object field
  2. Create the loop https://gist.github.com/thisbit/c6039d719f871386c0a6d989c0c9aa80
  3. Go to page that has the access to that field, and pull the posts you want same way you do it in the "Include posts" in GB
  4. Grab the last post in the field and drag it to the first place
  5. Works

features In the screenshot you can both see the GB Include posts (in the sidebar) and the ACF post object bellow the content

here is how to set up post object in the ACF settings page here is how to set up post object in the ACF settings page


thisbit avatar May 06 '22 09:05 thisbit

@thisbit would be really helpful to be able to rearrange your posts within the select. But given the current state of Query loop, and other features we are planning for the near future we won't be doing this anytime soon. Still gonna move this to our backlog for future updates. Thanks

JeanPaiva avatar May 18 '22 12:05 JeanPaiva