ACF (Advanced custom fields)

What do I use when I need to create easy-to use and lightweight functionality to let business owners add additional information about some issue in WordPress admin panel?

The answer is – AСF plugin (Advanced Custom fields).

Small instruction:

  1. Install and activate plugin
  2. Go to “Custom Fields” in menu bar in Admin panel of WordPress
  3. Press “Add new” and name new group. 
  4. Choose conditions (in what types of pages, posts custom fields will be displayed). For example, if you need to display location input only in tours category posts and don’t want them show in food category posts, set the following condition “Post Category” is equal to “Tours”.
  5. Go to one of the posts in choosen category and edit it. You will see input fields in the bottom. 
  6. Fill them.
  7. Go to FTP (wp-content –> themes –> theme name –> single.php
  8. After get_template_part( ‘entry’ ) insert the following code:

<?php echo get_field(‘location’); ?>

It will display the content that you write down in input field named “location” in posts in category “Tours”

 

(Visited 14 times, 1 visits today)

Leave a comment

Your email address will not be published. Required fields are marked *