I’m using ACF Form in Front-end of a WordPress website. It is used to create a custom posts in WordPress. I need to add two submit buttons in this ACF Form. when i click the first button, it should create a new post and post status should be publish and when I click the another button, it should create a
Tag: advanced-custom-fields
Shortcode from ACF Default Value only working after post is saved
I have this shortcode which is saved in the Default Value text field of an ACF field. The field type is Wysiwig editor. I get the Default Value text by using acf_get_field(‘location_info’)[‘…
How to generate a pdf on post saving or updating
I’m trying to create a PDF from post content, including some ACF fields. Currently I’ve got it working on a POST form and dynamically creating a PDF each time, but I’d like to make it generate the PDF …
Auto fill a Custom Post Type title from ACF field
I’d like to auto fill the title of three Custom Post Types (CPTs) based on an ACF field. I found the code below, but don’t know how to write it for three CPTs instead of just one. I would appreciate the help! Answer Try this code. It should work for you. Update Replace the previous code with the following. It
WordPress custom field for multiple pages
I am using ACF pro for creating custom field for my wordpress website. I have a custom field in home page which I want to use in another three pages. Code I have given below.
WordPress: Check if plugin is installed (ACF)
I want to prevent fatal error in my theme if the ACF plugin is deactivated or not installed. The main function of the plugin is get_field(). I wrote this code in my functions.php to check: if ( !…
WordPress custom field outside of loop
I currently have a banner image on a site which is pulled in via the featured image. The code below that does this works: I would like to change this to use a custom field instead via Advanced Custom Fields. I have made a custom field called banner_image with the type as image url. I cannot seem to get this
Get custom fields values in filter on wp_insert_post_data
Hi all, thanks for reading. Environment : Wordpress + Advanced Custom Fields plugin Problem : I have searched for hours now and I can’t seem to find the correct syntax to do the following: When …