How to create View shortcode?

How can I start?

In left menu of your Admin dashboard, click on Content Views >> Add View.

Let’s start to display posts by View

To display your posts with Content Views plugin, please follow 3 simple steps below:

– Step 1 : Filter your desired content (post, page, product, portfolio…) by ID, category, tag, author, keyword… in Filter Settings tab

– Step 2 : Select one from many beautiful grid or list layouts to display your content in Display Settings tab. You can customize the layout with many useful settings.

– Step 3 : Save the View, then paste the generated shortcode [pt_view id="UNIQUE_ID"] to anywhere you want to display your grid/list (Visual/Text editor, Gutenberg editor, Text widget…).
If you are a developer, you can add this code
<?php echo do_shortcode('[pt_view id="UNIQUE_ID"]'); ?>
to files of your WordPress theme.

Notices:

Please DO NOT wrap the View shortcode inside <pre></pre> tag like this <pre>[pt_view id="UNIQUE_ID"]</pre>.

In Block editor (Gutenberg):

  • Please DO NOT add the View shortcode to the Code < > block.
  • You can add to these blocks: Shortcode, Paragraph, Custom HTML, Classic.
  • Or you can simply paste the View shortcode to the Block editor:
    Add the view shortcode to Block editor

This is the video demonstrates 3 above steps:

Thank you,

Scroll to Top