=== ACF Views === Contributors: wplake Tags: acf, display custom fields, display posts, acf views, shortcode, custom fields in frontend, show acf fields, get field values, get posts Requires at least: 5.5 Tested up to: 6.1 Requires PHP: 7.4 Stable tag: 1.7.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html The simple way to display posts (or CPT items) and their ACF fields anywhere on your site using shortcodes. == Description == ACF Views is the simple way to **display posts (or CPT items) and their ACF fields** anywhere on your site using shortcodes. This means you don’t need to write any PHP code to query posts, get field values and display it anymore! The views are reusable and their shortcodes can be pasted ANYWHERE (that supports shortcodes e.g. Gutenberg shortcode block or WooCommerce product page) with ANY THEME using ANY PAGE BUILDER. Import Demo lets you get started in seconds. Click, import and you've got a basic setup for an ACF Group, ACF view and a Demo Post. **Important! "ACF Views" plugin requires [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/) plugin to be enabled on your website (either Free or PRO version).** == Display content == Solve all these scenarios without coding. Almost all plugins use CPT to store their data, it means our plugin supports them! Like WooCommerce Products. Output markup will be generated automatically and can be styled easily using custom CSS rules included in every view. * Display page's ACF fields on the same page Real example : add ACF fields to your homepage and display them * Display specific posts (built-in or CPT, manually assigned or by filters) with their fields Real example : display 10 latest WooCommerce products with their ACF fields * Display specific post (or CPT item) with its fields Real example : display information about a sponsor (Sponsor CPT item) on another post * Display specific ACF fields for all items of a CPT Real example : display specific ACF fields for all WooCommerce products See tutorials on [our youtube channel](https://www.youtube.com/watch?v=Ieu3Mk2Ah0A&list=PL4WYpE2DYvTyzk1DtNhXJ4BXRjtIndht3). == Powerful features == * Use ACF View item to display ACF fields for a specific post/page/CPT item * Use ACF Card item to choose a set of posts (or CPT items) and display them with their ACF fields * Display built-in post fields (like title or thumbnail) in your view along with ACF fields * Define custom CSS & JS * Display fields from another page/post/CPT item * Combine fields from different ACF groups in one View * Restrict access to ACF View Or Card by user roles == High Performance == Every wrapper has some overhead. We do our best to make this number as small as possible. One unique ACF View/Card on a page would only effect this by 0.01 seconds**\*** overhead compared to the usual way with coding. It's impossible to notice these tiny numbers visually without testing it. **\***More about the test [here](https://docs.acfviews.com/getting-started/performance). == Extensive Docs and Friendly Support == Our [YouTube channel](https://www.youtube.com/watch?v=Ieu3Mk2Ah0A&list=PL4WYpE2DYvTyzk1DtNhXJ4BXRjtIndht3) showcases the use of our plugin and its features, making it easier for new users to get started. See our [Docs](https://docs.acfviews.com/getting-started/acf-views-plugin-for-wordpress) for step by step guides and for information about customization. Questions about the Free ACF Views plugin are handled through the [support forum](https://wordpress.org/support/plugin/acf-views/). Customers with an active PRO license have personal support via our [contact form](https://wplake.org/contact-us/). == Get more with PRO == Do you need more? We have a [PRO version](https://wplake.org/acf-views/) with extra features: * Edit HTML Markup. For more advanced layouts, edit the markup output of your view and card with endless possibilities. Do you want to add a custom variable or change the default post markup to get 2 columns? This feature is made for you. Still without coding, to change the default markup only HTML knowledge is necessary. * Filter posts by meta and taxonomies. Use AJAX pagination Make your post selection more precise with meta field filters or taxonomy filters. Use AJAX pagination (button, page numbers or infinity scroll) for a set of posts without coding! * Repeater field type Unlock the use of repeater field type to display your set of items within a View (instead of creation CPT). Do you want to have a grid or a list in your view? This feature made for you. * Add Custom Gutenberg blocks Creating your own Gutenberg blocks have never been this easily. Turn on a special checkbox in your view that will add a new Gutenberg block to your blocks library without any coding. All chosen fields will be available for population by admins, markup from the view will be used to display the block. Use the block sitewide, even multiple times per one page. * Add plugin’s shortcodes to pages/CPT items without code editing Mount Points allow you to add a shortcode to non editable places, that usually require editing PHP templates. Simply ‘Mount’ a shortcode to the target place by using the position control and limiting to specific posts or post types. See tutorials on [our youtube channel](https://www.youtube.com/watch?v=Ieu3Mk2Ah0A&list=PL4WYpE2DYvTyzk1DtNhXJ4BXRjtIndht3). == Video overview == https://youtu.be/UaxdVYupmok == Screenshots == 1. Overview page will go you through all main points 2. Import Demo lets you get started in seconds. Click, import and you've got a basic setup for an ACF Group, ACF view and a Demo Post 3. List of ACF views, all management is available via the familiar interface 4. Create ACF View item to select target ACF fields and copy the shortcode to display field values for a specific post/page/CPT item 5. ACF View has advanced settings that allow you to add your own CSS/JS code 6. List of ACF Cards, all management is available via the familiar interface 7. Create ACF Card item to choose a set of posts (or CPT items) and paste the shortcode in a target place to display the posts with their ACF fields (which fields are printed depending on a selected ACF View in the Card settings) == Frequently Asked Questions == = Supported field types = ACF Views currently supports the following field types (with all available return formats): Basic * Text * Textarea * Number * Range * Email * Url * Password Content * Image * File * Wysiwyg Choice * Select * Checkbox * Radio * True_false Jquery * Date_picker * Date_time_picker * Time_picker * Color_picker Relational * Link * Page_link = How to create an ACF View = Create ACF View item to select target ACF fields and copy the shortcode to display field values for a specific post/page/CPT item. 1. Setup Fields in your Advanced Custom Field Group 2. Create an ACF View and select target fields (they can be from different field groups) 3. Copy and paste the shortcode in the target place (like a page or post, WooCommerce product...) 4. Make sure the chosen fields are filled at the target object. By default, field values will be read from the current object where the shortcode was pasted. To show another object's data use the special shortcode argument (object-id). That's it! Now you can visit the frontend, your view will get field values properly (depending on a field type), and will automatically insert an HTML markup, that you can style with CSS (using assigned or built-in view classes). You can restrict access to the ACF View by using user-with-roles="ROLE1,ROLE2" user-without-roles="ROLE1,ROLE2" shortcode arguments. = How to create an ACF Card = Create ACF Card item to choose a set of posts (or CPT items) and paste the shortcode in a target place to display the posts with their ACF fields (which fields are printed depending on a selected ACF View in the Card settings). 1. Setup an ACF View following the guide above 2. Create an ACF Card, choose a target ACF View and setup post filters (like post type) or manually assign posts 3. Copy and paste the shortcode in the target place (like a page or post) That's it! Now you can visit the frontend, your view will get posts and display them, using the ACF View, now you can style output as grid/list/whatever with CSS (visit an ACF Card Advanced tab). You can restrict access to the ACF Card by using user-with-roles="ROLE1,ROLE2" user-without-roles="ROLE1,ROLE2" shortcode arguments. == Changelog == = 1.7.0 (2022-10-27): = - View, Card : MountPoints feature - View, Card : improved CSS shortcuts = 1.6.17 (2022-10-24): = - Updated readme - Updated field labels = 1.6.13 (2022-10-21): = - Performance : improved caching = 1.6.12 (2022-10-21): = - Copy to clipboard : improved working on HTTP protocol, fixed the roles shortcode copying = 1.6.11 (2022-10-21): = - Copy to clipboard : improved working on HTTP protocol = 1.6.10 (2022-10-21): = - Demo import : fixed a bug - Gutenberg block feature : improved notice - Improvement : removed double slashing for View/Card fields in DB = 1.6.0 (2022-10-21): = - Performance improving : View/Card settings now in JSON from post_content instead of using postMeta - Gutenberg block feature : fixed a bug = 1.5.10 (2022-10-17): = - Card Shortcodes postbox : fixed wrong argument name - ACF dependency : improved links (to the local add-plugin page) - Improved redirection after activation (to use TRANSIENTS) - Automatic deactivation one of instances when both Basic & PRO activated - Added information about restricting access to View/Card by user roles - Added escaping output of plain field types - Improved import = 1.5.0 (2022-10-13): = - Downgraded ACF dependency from PRO to Basic - New shortcode arguments : user-with-roles, user-without-roles - Fixed ImageSize for repeater fields = 1.4.10 (2022-10-12): = - View : preview feature - Card : preview feature, custom variables filter - Improved 'ACF PRO' dependency notice = 1.4.0 (2022-10-10): = - View : reordered fields (new tab) - View : image size field : dynamic list instead of hard coded, $Post$ thumbnail support = 1.3.1 (2022-10-04): = - View : improved Gutenberg block description - Toolbar improved - Code structure improved - Filters added = 1.3.0 (2022-09-30): = - Backend optimization - Card : fixed CSS classes field - Card : new tab - "Layout" - View : improved UX (field settings is displayed only for specific field types) - View&Card : disabled autocomplete = 1.2.1 (2022-09-28): = - Overview page content - Demo imported error fixed - Demo import improved (added ACF Card) = 1.2.0 (2022-09-27): = - Card markup preview field - Card no posts found message - Preview of PRO fields - Admin Table bug fixed (select all) - clone item feature improved = 1.1.1 (2022-09-25): = - Markup and other improvements = 1.1.0 (2022-09-20): = - Markup improvements = 1.0.11 (2022-09-19): = - ACF Cards, readme = 1.0.10 (2022-09-09): = - Readme, assets = 1.0.9 (2022-09-09): = - Minor improvements, readme = 1.0.8 (2022-09-01): = - Improved code editor = 1.0.7 (2022-08-31): = - JS code feature - Link and Page_link field types = 1.0.6 (2022-07-30): = - Code improving = 1.0.5 (2022-06-24): = - Demo import feature = 1.0.4 (2022-06-18): = - Video review = 1.0.3 (2022-06-09): = - Readme = 1.0.2 (2022-06-09): = - Plugin's version = 1.0.1 (2022-06-09): = - Screenshots, plugin's version