ACF Field For CF7
Ever struggled with placing Contact Form 7 forms exactly where you want on your web site? Normally, to display a Contact Form 7 form, you need to copy a shortcode like [contact-form-7 id="123"] and paste it in the right place. One wrong character and the form breaks. If you have 10 pages with different forms, managing all those shortcodes becomes a headache. ACF Field for CF7 solves this. It adds a simple dropdown field with help of Advanced Custom Fields to your page editor that lists all your Contact Form 7 forms. Just pick the form you want and it’s done. It shows up on your page. No shortcodes to copy. No code to write. No mistakes. Before vs After This Plugin Without this plugin: 1. Create a form in Contact Form 7. 2. Copy the shortcode. 3. Paste it into your page, widget, or template. 4. Hope you didn’t mistype anything. 5. Repeat for every page that needs a different form. With this plugin: 1. Create a form in Contact Form 7. 2. Add a Advanced Custom Field for Contact Form 7 to your desired location. 3. Pick Contact Form from a dropdown field. 4. Done. Key Features • One-Click Form Selection — A clean dropdown in your editor lists every Contact Form 7 form. Pick one, save, done. • No Shortcodes Required — Forms render automatically on the front end. No copying, no pasting, no broken markup. • Client-Friendly — Content editors manage forms without developer help. Fewer support requests for you. • Ultra Lightweight — Only ~10 KB. Zero impact on site speed or performance. • Allow Null Option — Make the form field optional so editors can leave it empty when no form is needed. • Trusted by 10,000+ Sites — Actively installed and maintained since 2012. For Developers: Quick Start Register an ACF field with type contact_form_7, then output it in your template: // Display the form directly echo get_field( 'your_form_field' ); Need the CF7 form object instead of rendered HTML? Use this filter: add_filter( 'acf_cf7_object', '__return_true' ); Now get_field() returns the WPCF7_ContactForm object for full control over the output. Real-World Examples • Landing Pages — Each landing page has its own lead capture form. Editors pick which form appears — no developer needed. • Service Pages — A web agency builds one template for all service pages. Each page shows a different inquiry form selected by the client. • Site-Wide Default Form — Use with ACF option pages to set one global “Contact Us” form across headers, footers, or sidebars. • Multi-Language Sites — Different forms for different languages, each selected per page through the editor. ACF Field For CF7 Pro Need more? The Pro version adds: • Gutenberg Block Support — Use CF7 forms inside the WordPress block editor. • Widget & Theme Customizer — Place forms in widget areas and customizer panels. • Allow Null — Make the form field optional so editors can leave it empty when no form is needed. • Disable Forms — Mark one or more forms as disabled to prevent them from being selected. Download the ACF Field For CF7 Pro Compatibility This plugin works with: • ACF 5 • ACF 6 • Contact Form 7 5.9 and above • WordPress 6.0 and above • PHP 8.1 and above
Top keywords
- form30×5.63%
- contact11×2.06%
- field11×2.06%
- contact form10×1.88%
- forms10×1.88%
- acf7×1.31%
- page7×1.31%
- cf76×1.13%
- different5×0.94%
- pages5×0.94%
- acf field4×0.75%
- editor4×0.75%
ACF Recent Posts Widget
ACFRPW adds a new widget to the Appearance -> Widgets -> ACF Recent Posts Widget. Most of the fields are quite obvious, you can choose from a set of settings to display the posts from. Each setting alters the amount and type of posts listed in the sidebar. Available Settings The widget supports the following settings: Widget Title Custom Widget container CSS class Option to ignore sticky posts Search keyword query Id based post exclusion Date Display, Date Modified, Relative and Custom Date Format specifiaction Listing posts from specific date period (start and end) Listing posts with specific password, listing password protected posts only or excluding these Post Type selection Post Formats selection Post Statuses selection Listing posts limited to author via author id Order specifiaction (ASC or DESC) Orderby specification (ID, Author, Title, Date, Modified, Random, Comment Count, Menu Order, Meta Value, Meta Value Numeric) Meta Key specifiaction (if Meta Value or Meta Value Numeric were chosen as orderby rule) Meta Comparison selection Meta Value Specification (for the Meta Comparison selection) Category limitation Tag limitation Id based custom taxonomy limitation Operator specifiaction for the above rules Number of posts to show Number of posts to skip Thumbnail display, thumbnail size (width, height), thumbnail alignment, default thumbnail Excerpt display, its word limit, its readmore text (occurs only if the amount of words exceeds the limit) Custom HTML to display before the loop Custom HTML to display after the loop Custom HTML to display before each posts. It supports custom meta keys and ACF fields Custom HTML to display after each posts. It supports custom meta keys and ACF fields Custom HTML to display for no posts found Custom and default CSS Custom HTML templates ACF supported fields The plugin has been tested with ACF 6 (Free and Pro). The plugin supports the following ACF fields: Text Textarea Number Email Password Wysiwg Editor Image File No other fields have been tested and are supported at the moment. Shortcode From version 4.4 the plugin supports shortcode embeds. Given the amount of options and their specific names (as in shortcode attributes) the shorcode builder has been introduced see 7th and 8th screenshots for the reference. You’ll see a popup once clicked on ACFRPW button which gives one an ability to automatically set up the shortcode code for you. The rest follows all of the options specified here. To use the shortcode one needs to have the WordPress editor enabled for the current page / post type. In case it was disabled (say via ACF) the button won’t appear. Creating Custom Templates From version 4.3 the plugin supports custom templates. To make usage of these one needs to make a copy of all the files found in the acf-recent-posts-widget/templates directory and copy them over to the active template directory to acfrpw subdirectory. The approach is similar to the way WooCommerce plugin works and has it’s drawbacks. With every new feature the files may be outdated. Similarly to the widget template files, a separate, custom markup can be created for the shortcode build post listing. Copy the acf-recent-posts-widget/template files to acfrpw-blog directory created inside your active theme directory. Template files There are 3 main template files: loop-after.php (which displays the markup after each of the posts and closes the markup container) loop-before.php (which displays the markup before each of the posts and opens the markup container) loop-inner.php (which is enqueued for each of the posts separatelly and contains the markup of every single post) Usage The usage is quite advanced hence each template file contains a quite detailed documentation on how to use it. First of all the template files mustn’t have the global variables removed. Each of these variables stores the widget settings, which are then used to generate the code. Second of all the variable names are unobvious, loop-inner.php template file contains a list of all the names used, which are then extracted and available as php variables. Different template per widget / sidebar The templates allow one to adjust the markup of each single widget. One needs first to verify the widget id used, which may then be referenced. The variable which stores the widget id is $acf_rpw_args[‘widget_id’]. Dumping the value in the template is the best way to find out which automatic id has been created for your widget. The best way to handle the templates is to learn from their code. My personal suggestion is to copy over the templates to the current theme and work directly on them, doing one change at a time. The templates require learning curve to use and there’s no single answer to everyones problem. Complex usage This section covers plugin complex usage for advanced user willing to have more control over the behavior of the plugin as well as explains uncommon functionalities. Using the HTML textarea fields These sections might not be obvious. The HTML or text before / after the whole loop setting is an area where you can specify custom HTML markup to be added before / after the whole posts list. The HTML or text before / after each post is an area where you can not only specify custom HTML, but you are also given an ability to print any meta key or certain ACF fields (see ACF supported fields) Meta Key Name / ACF Usage These fields need to be wrapped inside the {meta name} or {acf field_name} tags (which are similar to shortcodes). The plugin will then parse these fields and print their according value. Say we have a custom ACF field of type text, for which the Field Name is “text”. To print its value one has to use [acf text] inside the befoe / after each post textarea. A similar solution applies to the meta key. Meta Value Usage The Meta Value field supports an array of elements, so that all of the meta_compare parameters could be used. To do so, please specify the two parameters separated by semicolon, for instance: 1234;12345. The plugin will convert these into an array and apply the proper operation for the two. Whatsmore the [date] shortcode can be used here. It takes the timestamp paramater as an argument, which is required – the possible arguments are the same as for the function described here: http://php.net/manual/pl/function.strtotime.php. For instance [date +1 day] would generate the tomorrow date in “Ymd” format. This can be used with custom meta field date. Plugin Filters The are several filters that can be used to enchance the plugin programatically: ‘acf_rwp_query’ which gives one the ability to filter the query applied to each widget. ‘acp_rwp_before’ which gives on the ability to filter the Front End output of the plugin before each post. There are two hooks attached here already which allow usage of the [acf] and [meta] shortcodes. ‘acp_rwp_after’ which gives on the ability to filter the Front End output of the plugin after each post. There are two hooks attached here already which allow usage of the [acf] and [meta] shortcodes. ‘acf_meta_value’ which filters the meta_value query parameter. Check the acf_widget_widget file for the arguments and use cases. Dependencies ACF (optional) Widget Base Class (included) Shortcode popups generator (included) Other Online Demo Plugin site and Docs Plugin Development Survey Languages Supported English (default) Polish (since May 11 2015) French (since June 29 2015), by wolforg, standalone source Spanish (since July 30 2023)