Skip to content

Consolidating the Query Loop block, Latest Posts block and Post Lists block  #32332

Closed

Description

@paaljoachim

Description

At the moment there exists three blocks that to me seems to do the same thing.
The Query block, Latest Posts block and the Post Lists block.

Post-lists

It seems like the settings vary a bit between the blocks as well.

My expectation is to have one block that covers what is needed to show Posts or a CPT, with a few different filters on how I would like to show the Posts/CPT on each page. Having three block options to choose from is very confusing.

Consolidating the three blocks into one block would be helpful, as a user would then be able to select the specific block to do what is needed to show the specific content.

Activity

  1. added
    [Block] Latest Posts
    [Block] Query Loop
    [Type] Enhancement
    on May 28, 2021
  2. mrfoxtalbot commented on Jun 6, 2021

    @mrfoxtalbot

    I would argue that the Page List block should also be merged/consolidated.

    Screenshot 2021-06-06 at 12 16 27

  3. added
    [Block] Page List
    on Jun 6, 2021
  4. javierarce commented on Jun 28, 2021

    @javierarce
    Contributor

    Combining those four blocks into one is a great idea.

    In the case of Post Lists block, it would be quite easy since it’s the same block under a different name. 



    Page List block would also be trivial to combine, and the users would benefit from having more control over the results since this block just spits out a list of all the pages the user has.



    The only thing users would lose if we got rid of this block would be the possibility to create a bulleted list, something that I’m not sure it’s possible to achieve in an easy way using the Query block.


    Latests Posts (LP) would be a little more difficult to remove right away because it has some nice settings that are a bit difficult to achieve with the Query block

.

    Here’s a table with the equivalent methods and some pros/cons for the alternative method in the Query block (QB):

    LP setting QB solution QB pros QB cons
    Dividers Separator block Users can change the type of border and its color The divider has a fixed width.
    Border Grouping the post and setting the border More options to change the type of border Difficult for the average user?
    Post Content Post Content block — —
    Excerpt Post Excerpt block — It's not possible to set the maximum number of words
    Author Post Author block It gives more configuration options like avatar, bio, or byline —
    Post Date Post Date block Gives more customization options like date format, color, typography, or even link it to the post
    Featured image Post Featured Image block — The block gives less control over the image than the Latest Posts block, where users can change width, show thumbnail or full image, etc. There's a ticket that will solve this.

    Finally, the Latest Posts filters are similar to the ones in the Query block, but in the Latest Posts block, users can change the number of items from the sidebar.

  5. javierarce commented on Jun 28, 2021

    @javierarce
    Contributor

    While I was thinking about this issue, I thought of another idea: instead of consolidating these blocks into one, would it make sense to leave them as independent blocks but make them all use the Query block internally? The only difference would be that initially, they would have different settings to render each kind of list.

  6. added
    Needs Design
    on Jun 28, 2021
  7. javierarce commented on Jul 5, 2021

    @javierarce
    Contributor

    After thinking for a while about this issue, I think that my second idea makes more sense. The basic Query block should be a powerful and "content agnostic" block, probably more oriented towards advanced users with specific needs (like theme developers).

    The other blocks would use the Query block internally but start with a different set of defaults, reducing the number of blocks to maintain and offering a similar experience to the user while at the same time helping them to find an appropriate block faster.

    Another important thing we'd need to pay attention to is the name of the block in the sidebars. Right now, if a user inserts a Posts List block, the List view and the right sidebar show "Query Loop", making the interface disorienting.

    Screenshot 2021-07-05 at 14 04 47

  8. javierarce commented on Jul 7, 2021

    @javierarce
    Contributor

    I found this ticket by @jameskoster that has a more comprehensive list of enhancements and ideas about the Post List block #32268

  9. added
    [Block] Post Content
    on Nov 6, 2022
  10. changed the title [-]Consolidating the Query block, Latest Posts block and Post Lists block [/-] [+]Consolidating the Query Loop block, Latest Posts block and Post Lists block [/+] on Nov 29, 2023
  11. jarekmorawski commented on Jun 6, 2024

    @jarekmorawski
    Contributor

    FWIW, we faced a similar issue with the Product Collection block in WooCommerce. We decided to merge all block variations into one and surface them in the Inspector and block toolbar.

    image

    Happy to provide more information and the designs if you're interested.

  12. paaljoachim commented on Jun 19, 2024

    @paaljoachim
    ContributorAuthor

    Hey @jarekmorawski

    Thank you for the feedback to various issues! It is greatly appreciated!
    Do please add the designs.

    Thank you again!

  13. andreawetzel commented on Nov 26, 2024

    @andreawetzel
    Contributor

    Noting that the Posts Lists variation was removed in 6.7 #63404

  14. youknowriad commented on Oct 7, 2026

    @youknowriad
    Contributor

    Thanks for raising this! The Posts List variation, the most direct duplicate of Query Loop, was removed in WordPress 6.7 (#63404). Latest Posts and Page List serve their own purposes (widgets and navigation), so there are no plans to merge them. Closing, but if there's a specific confusion in the inserter, please open a focused issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Design[Block] Latest Posts[Block] Page List[Block] Post Content[Block] Query Loop[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions