For the complete documentation index, see llms.txt. This page is also available as Markdown.

Displaying Posts in the Classic editor

Since WordPress 5.0, the Classic Editor has no longer been the default WordPress editor and has been replaced by Gutenberg. However, the Classic Editor is still available as an official standalone plugin.

Notably, it has more than 9 million active installations, keeping it as one of the most popular WordPress plugins, often used as a cleaner editor for Custom Post Types.

Using Post Selections from Advanced Views, you can easily master advanced post queries and display Posts, Products, or any CPT items in the Classic editor.

This page refers to "Post" as a generic WordPress term that covers Posts, Pages, any Custom Post Types, Media attachments, WooCommerce Products, and other entities.

1. Create a Post Layout

Before mastering a query, we need to create a Layout for a single item, which will be used to render all found Posts in the loop. Inside the Smart Layout Template, you can display any kind of fields, add conditional logic, or merge field values.

  1. Add target fields in the Fields tab

  2. Save the Layout

After saving, Advanced Views automatically creates the starting template. You can change the default field appearance by customizing the Layout template.

Once you've defined the fields list, Advanced Views automatically generates a default template for them. It recognizes each field type and produces the appropriate markup - for example, an <img> tag for an Image field, a loop for a Gallery field, and so on.

Advanced Views eliminates the need to learn your field provider's documentation or manually retrieve field data. It automatically transforms raw database values into template-ready formats.

For example, an image ID stored in the database is passed as a complete image object with properties such as src, width, and height. This lets you focus on crafting the layout instead of dealing with field types and meta retrieval.

2. Create a Post Selection

Post Selection is built on top of WordPress's native WP_Query and provides a user-friendly interface for its most commonly used arguments.

This eliminates the need to learn the extensive WP_Query Docs for everyday use, while still allowing you to inject custom query arguments directly for advanced or uncommon scenarios.

  1. Define the Item Layout: choose the Post Layout from the first step

  2. Define the post filters; optionally add Taxonomy and Meta filters

  3. Save the Post Selection and copy its embedding shortcode

3. Embed Post Selection

In Advanced Views, Post Selections are embedded using native WordPress shortcodes, which you can paste in any place in the Classic editor:

  1. Edit the target page or post

  2. Paste the Post Selection shortcode in any place

  3. Save the page and visit it to see the result

Last updated