Simple as this:
<?php echo do_shortcode( '[contact-form-7 id="'.get_field('form').'"]' ); ?>
You have to notice, you should use get_field()
to return the value. the_field()
will echo it.
Related Posts:
- possibility to control embedded video timeline with buttons and links external to the player
- Problem with using custom shortcode with ACF WYSIWYG field
- Can I wrap an unordered list inside a shortcode?
- Create shortcode in WordPress, using one variable in 3 functions?
- Shortcode default attributes over-riding non-default attributes
- Image Shortcode from ACF ID
- Basic do shortcodes question
- How to Generate html tags using shortcodes?
- Pass fileurl parameter into shortcode from Advanced Custom Fields
- Custom Shortcode + Querying and Ordering Posts using multiple Advanced Custom checkboxes
- Ordering get_terms with ACF not displaying all terms
- Adding a custom field to do_shortcode [closed]
- Shortcode strips formatting and returns at content top
- ACF repeater + group shortcode
- Need help in setting up a transient using API Key and if possible updating it in the ACF field
- Shortcode custom query not passing value
- If statement shortcode
- Use ACF array values in shortcode
- how to add acf value to other plugins shortcode?
- How do I use “while” and “end while” inside of the echo do_shortcode with ACF Repeater?
- How can I hide the ACF shortcode when empty
- Change appearance of shortcode text inside editor
- Combining shortcode and get_template_part
- Escaping quotes from shortcode attributes
- Shortcode output always showing at top of page
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- shortcode inside another shortcode
- Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]
- Custom Shortcode AJAX 400 Bad Request
- WordPress gallery ‘post_gallery’ filter doesn’t work with feeds?
- shortcode to create dynamic dropdown box form shortcode attributes
- conditional shortcode not working
- Ajax not returning anything on form submit
- How do I add my own custom shortcodes?
- Can’t seem to get [shortcode]s to work
- nested Shortcode doesn’t work
- Slow page loading when using a simple shortcode on the same page multiple times
- TinyMCE get selected text and underlying HTML
- Remove and restore one shortcode
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- other shortcodes in Contact form 7 MAILS [closed]
- Remove empty p-Tags in Shortcode content before non p-Tags
- How to change the page break numbering?
- Allow shortcode in the author bio textarea
- WordPress display image link in shortcode
- How do I combine my shortcodes?
- Bulk converting shortcodes to blocks with embeds
- How to add source code into wordpress post really?
- stop shortcode stripping in category and archive pages
- Make shortcode’s Bootstrap CSS override the theme’s CSS, how?
- Enumeration Contact form using database table’s numbe of rows [closed]
- Change the default video shortcode
- How to use shortcode in js url
- How to add AJAX in a custom PHP function using Google sheets API
- WordPress TinyMCE : Get value of popup button
- wp_editor in thickbox
- Using _e() on text inside video tags prints that text, instead of only showing when html5 element is not supported
- How to use the same shortcode with different attribute values on same page
- Youtube shortcode
- WordPress messes up with data attributes in shortcode output
- Shortcode will not pass attribute through to my function [duplicate]
- WordPress post pagination continuous [duplicate]
- custom field value as shortcode parameter
- How to edit blog page in wordpress? there is no place to put shortcode
- How to transform WordPress user role code to WP shortcode?
- Slow page Loads When Using Dynamic Coding
- Can I use shortcodes in mail body
- Query to list all galleries under a parent post?
- Adding the username into a URL to redirect to a specific page
- Shortcode Help Needed → attributes
- Video Shortcode & Video Poster Question
- How to use a nested shortcode to render the value of an attribute in parent shortcode
- Unique ID for WordPress shortcodes when used more than once on a page?
- Which wordpress function is the caption shortcode linked to?
- Content between shortcodes
- Parsing a shortcode through an author meta textfield
- Adding YouTube button to TinyMCE editor
- do_shortcode within a shortcode
- tiny_mce_before_init preventing custom shortcode icon appearing
- Custom Fields – Boolean Display of True/False to Yes/No
- Twitter bootstrap tabs
- Using Shorcodes in Sharing Preview and Notifications Title from Post Title
- Is the WP audio shortcode still relevant?
- Shortcode not working when I output data from wpdb html table row
- update_metadata() appends shortcode data for every page refresh
- Gallery shortcode is empty but magically creates a gallery
- Display tags cloud from a specific category ID with a shortcode
- How to avoid one code multiple times instead do that through some function? Shortcode, but I think shortcode is not used in main theme’s core files?
- Shortcode appeared twice on page, one time before content, one time where it’s really called
- Get current category and place it in shortcode
- Modify Blog Module layout in Child theme
- Inserting a variable into a shortcode inside php
- How can I define the output of shortcode attribute value?
- Using shortcodes that wrap around code
- Shortcode for Admin Theme Option?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What makes a placeholder resizable in Tinymce?
- How to scroll to a shortcode-generated anchor
- add post type pram to wp shortcode