- #Advanced custom fields pick a pmenu update#
- #Advanced custom fields pick a pmenu pro#
- #Advanced custom fields pick a pmenu code#
However, for the example shown above I created a sass file that you could easily be transferred between projects. The ‘jQuery Modal’ plugin comes with a very simple and lightweight css that is perfectly fine for styling. The end result is a simple, lightweight and flexible solution that can be easily modified to suit a variety of requirements. SetTimeout(showpanel, 2000) //set the delay time
#Advanced custom fields pick a pmenu code#
To achieve this I needed to modify the jQuery function from the default ‘on-click’ option and added the following code to the footer.php template in the theme. In this example I wanted the modal to fire 2 seconds after the page loaded and only on the home page. '/js/libs/', 'jquery', '', true) Īdd_action('wp_enqueue_scripts', 'load_javascript_file' ) Wp_register_script('modal', get_template_directory_uri(). Wp_enqueue_script('jquery') // Enqueue it! Wp_register_script('jquery', '', 'jquery', '3.1.1', true) // Load Google CDN jQuery Wp_deregister_script('jquery') // Deregister WordPress jQuery Works with the latest version of jQuery You’ll need to update the file path for ‘’ as required.
Step 3 – Adding js to your WordPress themeĪdd the following to the functions.php file. It was chosen because it is extremely simple & lightweight. jQuery Modal is the plugin that I’m using for this example. Next the modal.php template was created to display the ACF fields. Step 2 – Creating the Template for the WordPress themeĪs mentioned prior the active state of the modal is controlled by a select field. In this example I only want the modal to be active on the home page of the website, so the following was added to the header.php template. Once add the field is set-up you can then enter the content for the modal in the options panel. If you want you can download the json file here and add it to a ‘acf-json’ folder in your theme. When using ACF I always take advantage of the local json support. The following are added as choices to the ‘Select’ field. This was added to enable the user to switch the modal ‘on’ and ‘off’ as required, it also ensures that we can control the loading of the supporting js & css which eliminates the loading of unnecessary resources if it’s not in use. The example here contains a few standard field types, including a select field. Step 1 – Create the ACF field groupįirst step is to create the custom field group. Pricing plans for both ClickUp and Asana include advanced features that let businesses get.
#Advanced custom fields pick a pmenu pro#
If you want to do it this way you’ll need the Pro version of the plugin, however it can be implemented on the free version. Select the Custom Fields you want to display on task cards. Please note for this example I’ve added the functionality to an Options panel. However, by using Advanced Custom Fields (ACF) you can pretty much make this support whatever fields or media you require. The requirements and functionality are quite simple. This was originally created as an alternative to adding a plugin and is designed to be lean and lightweight.
It’s one of the most visited pages on our website and a recent comment prompted me to create an updated post with a solution that works with the latest version of jQuery and uses a modal plugin that is still supported.
#Advanced custom fields pick a pmenu update#
This tutorial is an update of a post I originally wrote in 2013.