Content Views – Post Grid & Filter (Shortcode, Blocks, Elementor Widgets)
Content Views is the most popular grid plugin to create stunning Blogs, News, Personal, Portfolio, Business, and Shop sites. Easy to display posts, pages, custom post types, images, and taxonomy terms in attractive grid, list, slider, accordion, pinterest, timeline, overlay, and more. Show recent posts, category posts, tag posts, author posts, posts by keyword, posts by custom field, posts by date, etc. effortlessly. Classic editor friendly & Gutenberg block editor ready & Elementor supported! See Live Demo | Content Views Pro | Documentation | Support 🏆 SHORTCODE FOR CLASSIC EDITOR AND PAGE BUILDERS Content Views provides a powerful shortcode feature to work with the Classic editor and page builders in 2 simple steps: Step 1: Create a View Start by creating a View where you can query and sort any posts, pages, custom post types by category, tag, taxonomy, custom field, post ID, post title, date, author, etc. You can select from 20 layouts that fit your needs, customize and style them with many options. You can also choose and import from our library of 76 stunning pre-made designs (read more). Step 2: Add Shortcode Add the created view shortcode to the Classic editor, page builder, widget, or anywhere you want to display your post grid. 🏆 BLOCKS & PATTERNS FOR BLOCK EDITOR Content Views extends the Block Editor with 16 advanced blocks and 76 prebuilt patterns to help you build WordPress websites faster and more professionally: 💎 16 GUTENBERG POST BLOCKS Content Views adds 16 amazing and feature-rich blocks to help you display WordPress posts, pages, custom post types stunningly. Using our awesome Gutenberg blocks plugin, you can build and show website content with endless customization options: Different blocks for different kinds of content/sections/websites Various post block layouts to provide you more design choices Advanced post query filters to control block content Built-in responsive settings in blocks Advanced typography settings Google fonts supported in blocks 💎 76+ READY GUTENBERG BLOCK PATTERNS & TEMPLATES To save your time and help you to build faster in the WordPress Block editor, we created a collection of 76+ stunningly designed Gutenberg block patterns and templates that you can explore and import to the Block editor with just a few clicks. You can customize these post block patterns & templates easily in the way you want with numerous block options. You can use our pre-designed post block templates to build a complete page in just a few minutes. You also can combine the post block patterns in your own way to create unique design for your WordPress website. 🏆 WIDGETS FOR ELEMENTOR PAGE BUILDER If you use the Elementor page builder, our plugin will enhance your Elementor experience with 16 advanced widgets for Elementor to showcase your posts, pages, custom post types, media files in stunning layouts (grid, list, slider, timeline, and many more). Each of our widgets for Elementor is a different way to show your content. All widgets are fully customizable with many useful and friendly options (to control what to show, and how to show): Powerful query controls for each widget Many layout and display options to completely control the output Advanced style settings to customize typography, color, padding, border, etc. With our plugin, you can build websites with the Elementor page builder so much faster and easier. 🏆 TOP FEATURES 💎 MULTIPLE LAYOUTS FOR ANY KIND OF WEBSITES We provide various attractive & responsive layouts for different types of websites and purposes. Pick one from our beautiful grid, list, slider/carousel, pinterest, masonry, timeline, glossary, accordion layouts that fits your need, and then customize it as you want with many flexible settings and options. Content Views is proud of helping bloggers, business/shop owners, companies, religious communities, universities, and government departments to show and build their WordPress websites content amazingly and efficiently. 💎 POWERFUL QUERY FILTERS Our shortcodes/blocks/widgets provide many options to help you query, filter, search, and sort any posts, pages, custom post types easily. Post Type Select one or multiple post types in your website including post, page, custom post types, media/attachment. Taxonomy Filter posts by categories, tags, custom taxonomy terms easily. Common Include, exclude specific posts by post ID or post title. You also can set post offset, and amount of posts to show. Sort/order By default, it sorts posts by published date to show recent posts or latest posts. You can change it to sort posts by modified date, post title, post ID, random order, menu order, and more. Filter posts by keyword Easy to find your posts by custom keyword that appears in post title, post content, post excerpt. Filter posts by author Find posts created by or not created by specific post authors and current logged-in author. Filter posts by status Display published posts, scheduled posts, private posts, or posts with another status easily with this feature. Filter posts by published date Display posts published today, yesterday, this week/month/year, within a custom date range. Filter Sticky Post (PRO) Hide sticky posts, show them at top, or show only sticky posts. Restrict posts by membership (PRO) Help you to show posts to only allowed members of membership plugins such as Members, MemberMouse… Filter posts by custom field (PRO) Filter your posts by one or multiple custom fields easily & quickly. It supports ACF, Meta Box, and other custom field plugins. 💎 ADVANCED FRONT-END FILTER (PRO) If you are looking for a truly powerful front-end filter or faceted search for your website, then this feature is for you. You can help your website visitors to find any posts, pages, custom post types easily by showing category, tag, custom taxonomy, custom field as filtering options in various formats such as dropdowns, checkboxes, radios, date ranges, number sliders, buttons. Also, you can show text search field, and sorting options by post date, post title, custom field. Furthermore, you can customize style of these filters, change their appearance order, etc. And you can show the filters above or beside the post grid. See Front-End Filter Demo 💎 AJAX & NORMAL PAGINATION Our plugin provides both normal and AJAX pagination. AJAX pagination will retrieve posts without reloading the page, using 3 different pagination styles including ajax numeric pagination, ajax load more, and ajax infinite scroll. It is easy to enable/disable pagination in our post grid. See Pagination Demo 💎 REPLACE THEME LAYOUT (PRO) Our special Replace Layout feature will help you to display beautiful grid/another layout for posts on below WordPress pages easily, without changing the theme, and no coding required: ✔️ Blog page ✔️ Category page ✔️ Tag page ✔️ Search page ✔️ Author page ✔️ Date page ✔️ Taxonomy, term page 💎 3RD-PARTY INTEGRATIONS & COMPATIBILITY Content Views seamlessly integrates with a wide range of plugins: WooCommerce: show products in beautiful layouts. Easily filter products by price, categories, tags, attributes, visibility. And show sale, best-selling, featured, top-rated products with one single click (see demo). The Events Calendar: filter events by categories, tags, start/end date, etc. and show events & their information in grid/list easily (see demo). Advanced Custom Fields, Meta Box, Pods: filter posts by custom fields, and show custom field for each post in the post grid (see demo). WPML, Polylang: display translated posts, pages, custom posts, taxonomies, custom fields automatically in our layouts. Membership plugins: show posts to only allowed members of Members, Paid Memberships Pro, MemberPress… Yoast SEO, Rank Math: filter posts by primary category, and show only primary category as meta output in the post grid. 🏆 AND MANY MORE GREAT FEATURES Here are some other great features that Content Views offers: 100% mobile-friendly shortcodes, blocks, and widgets Complete control over block content, layout and style Border, color, background, margin, padding settings Change the html tag, length of post title in the post grid Change post content/excerpt source, length Change post image size, styles in shortcodes, blocks, and widgets Lazy loading for images in the post grid Show post comment count Show post author name, avatar Show post category, post tag, post taxonomy in custom position Show post date in custom format Post meta field selection, position and styling Change the post link target attribute Social sharing buttons for each post in the post grid SEO and speed optimization for all shortcodes, blocks, and widgets Display advertisements between posts in the post grid Reusing the shortcode with extra parameters Right to Left (RTL) support Customizable output with many hooks 🏆 LIST OF SHORTCODE LAYOUTS, GUTENBERG BLOCKS, AND WIDGETS FOR ELEMENTOR All shortcodes/blocks/widgets support posts, pages, custom post types, media files and come with a lot of options to customize. Here is the key feature of each layout/block/widget: Grid Post – This post grid displays your posts in a beautiful standard grid layout List Post – This post list displays your posts in a list with post image on the left/right Pinterest – This post layout displays your posts in a modern stacking grid that looks like Pinterest.com Collapsible Post – This post layout displays your posts in a layout that can expand or collapse post content. It is a perfect choice for FAQ page or a narrow section Scrollable Post – This post layout displays your posts in a carousel/slider layout with navigation, indicator and autoplay to explore more posts easily Timeline – This post layout displays your posts in a classic Timeline layout like Facebook Big Post 1 – This post layout displays one big post above other small posts. Big post and small posts can be customized separately Big Post 2 – This post layout displays one big post beside other small posts. Big post and small posts can be customized separately Post Overlay 1 – This post grid displays a beautiful grid layout with overlay over post image Post Overlay 2 – This custom post grid has one post showing beside other stacked posts, and overlay enabled Post Overlay 3 – This advanced post grid displays one post beside 3 other posts (shown in 2 rows), with text overlay Post Overlay 4 – This post grid shows one post next to 3 other posts (shown in 2 columns), and overlay for image Post Overlay 5 – This new post grid has one post beside 4 other posts (shown in a 2×2 grid), with overlay enabled Post Overlay 6 – This custom post grid shows one post above other posts (shown in columns), with overlay on image Post Overlay 7 – This post grid has one post next to & above other posts, and overlay over the image Post Overlay 8 – This modern post grid shows 2 posts and 4 other posts in an advanced grid, with text overlay
Top keywords
- post96×5.52%
- posts65×3.74%
- grid30×1.73%
- custom28×1.61%
- show23×1.32%
- post grid18×1.04%
- content17×0.98%
- layout17×0.98%
- overlay17×0.98%
- page17×0.98%
- filter16×0.92%
- block15×0.86%
Meta Field Block – Display Custom Fields for ACF, Meta Box and More
This single-block plugin allows you to display custom fields, shortcode as blocks in the Block Editor. It supports custom fields for posts, terms, and users. It can be nested inside a parent block that has postId and postType context, such as Query Loop, WooCommerce Product Collection, Term Query, or used as a stand-alone block. You can display any field whose value can be retrieved by the core API (get_post_meta, get_term_meta, get_user_meta) and is a string or can be converted to a string. To display the field value in the Block Editor, it has to be accessible via the REST API or have the field type set to dynamic. You can also display custom fields created by the Advanced Custom Fields or Meta Box plugin explicitly. It supports all ACF field types and Meta Box field types whose values are strings or can be converted to strings. Some other ACF complex fields such as Image, Link, Page Link, True False, Checkbox, Select, Radio, Button Group, Taxonomy, User, Post Object and Relationship field types as well as Meta Box fields such as Select, Checkbox, Radio, Image, Video, Taxonomy, User, Post field types are also supported in basic formats. This plugin also provides developer-friendly hook APIs that allow you to easily customize the output of the block, display complex data type fields, or use the block as a placeholder to display any kind of content with object_id and object_type as context parameters. An edge case where this block is really helpful is when you need to get the correct post_id in your shortcode when you use it in a Query Loop. In that case, you can set the field type as dynamic and input your shortcode in the field name. The block will display it correctly on both the front end and the editor. Alternatively, if you only want to see the preview of your shortcode in the editor, you can also use this block as a better version of the core/shortcode. To quickly learn how this block displays custom fields, watch the short guide (for MFB version 1.3.4) by Paul Charlton from WPTuts. The video focuses on the Advanced Custom Fields plugin, but you can use a similar approach to display fields from other frameworks like Meta Box. Links Website How it works & tutorials MFB PRO What is the HTML output of a custom field? The HTML output of a custom field on the front end depends on the context of the field. It uses one of these core API functions to get the field value: get_post_meta, get_term_meta, get_user_meta. What is the HTML output of ACF fields? All basic field types that return strings or can cast to strings are supported – The HTML output is from the get_field function. Link type – The HTML output is: {title} There is no rel attribute if the target is not _blank Image type – The HTML output is from the wp_get_attachment_image function. The image size is from the Preview Size setting. True / False type – The HTML output is Yes if the value is true, and No if the value is false. Below is the code snippet to change these text values: add_filter( 'meta_field_block_true_false_on_text', function ( $on_text, $field_name, $field, $post_id, $value ) { return 'Yep'; }, 10, 5 ); add_filter( 'meta_field_block_true_false_off_text', function ( $off_text, $field_name, $field, $post_id, $value ) { return 'Noop'; }, 10, 5 ); Checkbox / Select type – The HTML output is: {item_value} , {item_value} The item_value can be either value or label, depending on the return format of the field. Multiple selected values are separated by ,. Below is the code snippet to change the separator: add_filter( 'meta_field_block_acf_field_choice_item_separator', function ( $separator, $field_name, $field, $post_id, $value ) { return ' | '; }, 10, 5 ); Radio button / Button group type – The HTML output can be either value or label, depending on the return format of the field. Page link type, Post object type – The HTML output for a single-value field is: {title} For a multiple-value field is: {title} {title} Relationship type – The HTML output is: {title} {title} Taxonomy type – The HTML output is: {term_name} {term_name} User type – The HTML output for a single-value field is: {display_name} For a multiple-value field is: {display_name} {display_name} For other complex field types, you can generate a custom HTML output by using the hook: apply_filters( 'meta_field_block_get_acf_field', $field_value, $post_id, $field, $raw_value, $object_type ) Or by using the general hook: apply_filters( 'meta_field_block_get_block_content', $content, $attributes, $block, $object_id, $object_type ) What is the HTML output of Meta Box fields? Similar to ACF fields, all basic fields that return strings or can cast to strings using the function rwmb_get_value are supported. The HTML output of cloneable basic fields is: {item_1_value} , {item_2_value} Use the following hooks to change the tag and the separator: apply_filters( 'meta_field_block_mb_clone_field_item_separator', ', ', $field, $post_id, $field_value ) apply_filters( 'meta_field_block_mb_clone_field_item_tag', 'span', $field, $post_id, $field_value ) Single image types – The HTML output is from the wp_get_attachment_image function. The image size is from the image_size setting. Image list types (Image, Image advanced, Image upload) – The HTML output is: Checkbox / Switch type – Similar to ACF True / False type. Multi-choice types (Select, Select advanced, Button group, Autocomplete, Image select, Checkbox list) – The HTML output is: {item_value} , {item_value} To display the label instead of the value, use this hook: apply_filters( 'meta_field_block_mb_field_choice_item_display_label', false, $field_name, $field, $post_id, $value ) To change the separator, use this hook: apply_filters( 'meta_field_block_mb_field_choice_item_separator', ', ', $file_name, $field, $post_id, $value ) Radio type – The output is the field value by default. To display label or change the separator, use the same hooks as the multi-choice types. Post type – The HTML output for a single-value field is: {title} For a multiple-value field is: {title} {title} Taxonomy, Taxonomy advanced type – The HTML output for a single-value field is: {term_name} For a multiple-value field is: {term_name} {term_name} User type – Similar to ACF User type Video type – The HTML output for a single-value field is: For a multiple-value field is: To display complex field types or change the output of a field, use the hook meta_field_block_get_mb_field or the general hook meta_field_block_get_block_content. Copy & paste snippets When using the meta_field_block_get_block_content hook to customize block content, we recommend selecting dynamic as the field type. This way, both the front end and the editor will show the changes. If you are working with ACF Fields, we suggest using the meta_field_block_get_acf_field hook to modify the field content. Similarly, Meta Box users should use the meta_field_block_get_mb_field hook to modify the content. ACF snippets can also be used with Meta Box fields, but you must use the correct hook name and replace the get_field function with the rwmb_get_value function. How to change the HTML output of the block? Using the meta_field_block_get_block_content hook: add_filter( 'meta_field_block_get_block_content', function ( $block_content, $attributes, $block, $post_id, $object_type ) { $field_name = $attributes['fieldName'] ?? ''; if ( 'your_unique_field_name' === $field_name ) { $block_content = 'new content'; } return $block_content; }, 10, 5); Using the meta_field_block_get_acf_field hook for ACF Fields only: add_filter( 'meta_field_block_get_acf_field', function ( $block_content, $post_id, $field, $raw_value, $object_type ) { $field_name = $field['name'] ?? ''; if ( 'your_unique_field_name' === $field_name ) { $block_content = 'new content'; } return $block_content; }, 10, 5); This basic snippet is very powerful. You can use it to display any fields from any posts, terms, users or setting fields. Please see the details in the below use cases. How to wrap the block with a link to the post within the Query Loop? Using the meta_field_block_get_block_content hook: add_filter( 'meta_field_block_get_block_content', function ( $block_content, $attributes, $block, $post_id ) { $field_name = $attributes['fieldName'] ?? ''; if ( 'your_unique_field_name' === $field_name && $block_content !== '' ) { $block_content = sprintf(' %2$s ', get_permalink($post_id), $block_content); } return $block_content; }, 10, 4); Using the meta_field_block_get_acf_field hook for ACF Fields only: add_filter( 'meta_field_block_get_acf_field', function ( $block_content, $post_id, $field, $raw_value ) { $field_name = $field['name'] ?? ''; if ( 'your_unique_field_name' === $field_name && $block_content !== '' ) { $block_content = sprintf(' %2$s ', get_permalink($post_id), $block_content); } return $block_content; }, 10, 4); This snippet only works with the block that has only HTML inline tags or an image. How to display an image URL field as an image tag? Using the meta_field_block_get_block_content hook: add_filter( 'meta_field_block_get_block_content', function ( $block_content, $attributes, $block, $post_id ) { $field_name = $attributes['fieldName'] ?? ''; if ( 'your_image_url_field_name' === $field_name && wp_http_validate_url($block_content) ) { $block_content = sprintf(' ', esc_attr($block_content)); } return $block_content; }, 10, 4); Using the meta_field_block_get_acf_field hook for ACF Fields only: add_filter( 'meta_field_block_get_acf_field', function ( $block_content, $post_id, $field, $raw_value ) { $field_name = $field['name'] ?? ''; if ( 'your_image_url_field_name' === $field_name && wp_http_validate_url($block_content) ) { $block_content = sprintf(' ', esc_attr($block_content)); } return $block_content; }, 10, 4); How to display multiple meta fields in a block? For example, we need to display the full name of a user from two meta fields first_name and last_name. add_filter( 'meta_field_block_get_block_content', function ( $block_content, $attributes, $block, $post_id ) { $field_name = $attributes['fieldName'] ?? ''; if ( 'full_name' === $field_name ) { $first_name = get_post_meta( $post_id, 'first_name', true ); $last_name = get_post_meta( $post_id, 'last_name', true ); // If the meta fields are ACF Fields. The code will be: // $first_name = get_field( 'first_name', $post_id ); // $last_name = get_field( 'last_name', $post_id ); $block_content = trim("$first_name $last_name"); } return $block_content; }, 10, 4); Choose the field type as dynamic and input the field name as full_name. How to display a setting field? For example, we need to display a setting field named footer_credit on the footer template part of the site. add_filter( 'meta_field_block_get_block_content', function ( $block_content, $attributes, $block, $post_id ) { $field_name = $attributes['fieldName'] ?? ''; // Replace `footer_credit` with your unique name. if ( 'footer_credit' === $field_name ) { $block_content = get_option( 'footer_credit', '' ); // If the field is an ACF Field. The code will be: // $block_content = get_field( 'footer_credit', 'option' ); } return $block_content; }, 10, 4); How to use MFB as a placeholder to display any kind of content? SAVE YOUR TIME WITH MFB PRO To display simple data type fields for posts, terms, and users, you only need the free version of MFB. MFB Pro can save you 90% of development time when working with ACF, or Meta Box complex fields. It achieves this by transforming your ACF complex field types into container blocks, which work similarly to core container blocks. This eliminates the need for creating custom blocks or writing custom code for displaying complex fields. Below are some video tutorials that demonstrate how MFB Pro can help you display complex fields: How to build a post template to display dynamic data without coding How to display ACF Repeater fields as a list, grid, or carousel How to display ACF Gallery fields as a grid, masonry, or carousel The main features of MFB PRO are: Display settings fields. Display ACF advanced layout fields: Group, Repeater, and Flexible content. Display ACF Repeater fields in a carousel layout, which is useful for displaying banner sliders. Display ACF Repeater fields in an accordion layout, which is useful for displaying FAQ pages. Display ACF Relationship and Post Object fields as a Query Loop. Display the ACF Image field as a core image block. Display the ACF Gallery field as an image gallery using grid, masonry, or carousel layouts. Display the ACF File field as a video block, an image block, a button block, or a link. Display the ACF Link field as a button block. Display the ACF URL field as an image block, a button block, a link, a video block, or an embed block. Display the ACF Email field as a button block or a link. Display the ACF oEmbed field as an embed block. Display the ACF Google Map field. All Meta Box field types that correspond to ACF field types support the same Pro features as ACF. Display the Meta Box Group field, similar to the ACF Group field. Display the Meta Box Cloneable Group field as a repeater block, similar to the ACF Repeater field. Supports row, stack, grid or carousel layouts. Display the Meta Box Post field as a Query Loop. Display the Meta Box single image field as an image block, and the image list field as an image gallery using grid, masonry, or carousel layouts. Display the Meta Box File single input field as a video block, an image block, or a button. Display a group field as a details block, and display a repeater or cloned group as an accordion. Set a single image sub-field (ACF Image or Meta Box Image) as the background image of a group field. Display custom fields from a specific post, term or user. Display a taxonomy field as a Terms Query block. Display a repeater or cloned group field as an core/accordion block. Since version 1.5.3, MFB Pro allows you to bind custom fields (ACF, Meta Box, core meta fields, and core settings) directly to core blocks (Heading, Paragraph, Button, Image, Video, Embed, and the background image/video/embed of Cover block). For more complex field types (Group, Repeater, Flexible Content), you can use MFB Pro to display the group as a container. Nested fields can then be displayed using the Sub Field Block, as before, or bound directly to core blocks. If this plugin is useful for you, please do a quick review and rate it on WordPress.org to help us spread the word. I would very much appreciate it. Please check out my other plugins if you’re interested: Content Blocks Builder – Build custom layouts and blocks visually in the Block Editor without needing a code editor, using only core blocks and native Gutenberg features. SVG Block – A block to display SVG images as blocks. Useful for images, icons, dividers, and buttons. It allows you to upload SVG images and load them into the icon library. Icon separator – A tiny block just like the core/separator block but with the ability to add an icon. Breadcrumb Block – A simple breadcrumb …