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

Displaying fields from a Comment

In WordPress, Comments can also have custom fields - usually created with ACF, MetaBox, or Pods. Advanced Views allows you to display them.

In Advanced Views, Layout embedding happens using native WordPress shortcodes. Each Layout has its own unique shortcode that can be pasted into any location, regardless of the theme, editor, or page builder you're using.

Shortcodes also support arguments, allowing you to customize the behavior of the same entity in different contexts.

1. How to display fields of a specific Comment

  1. Add any fields

  2. Save the Layout, copy its embedding shortcode

  3. Add the object-id="comment" argument

  4. Optionally. Add the comment-id="YOUR_ID"

  5. Embed Layout: paste the shortcode inside the target place

Shortcode format

To load fields from the options page, the Layout shortcode should contain at least 4 arguments:

[avf-layout name="Name" id="651d5d75bfdf2" object-id="comment" comment-id="YOUR_ID"]
  1. name argument - used for clarification purposes only and doesn't play any functional role.

  2. id argument - associates the shortcode with a specific Layout.

  3. object-id argument - with comment value

  4. comment-id argument - specifies the comment ID whose fields should be displayed.

Last updated