What are WordPress custom fields?
About This Plugin
Use the Advanced Custom Fields plugin to take full control of your WordPress edit screens & WordPress custom field data.
Add fields on demand. Our field builder allows you to quickly and easily add fields to WP edit screens with only the click of a few buttons!
Add them anywhere. Fields can be added all over WP including posts, users, taxonomy terms, media, comments and even custom options pages!
Show them everywhere. Load and display your custom field values in any theme template file with our hassle free developer friendly functions!
Custom Fields Features
- Simple & Intuitive
- Powerful Functions
- Over 30 Field Types
- Extensive Documentation
- Millions of Users
Important Links About Custom Fields Plugin
WordPress custom fields are metadata that are utilized to add extra data identified with the post or page, for example, title, creator name, date/time, and so forth.
As a matter of course, when you compose another post, page, or any substance compose, WordPress spares it into two distinct regions. The initial segment is the body of your substance that you include utilizing the post editorial manager.
The second part is the data about that specific substance. For instance, title, creator, date, time, and that’s just the beginning. This data bit of the post is called metadata.
WordPress consequently adds all the expected metadata to each post or page you make. WordPress additionally enables clients to spare their very own custom metadata utilizing custom fields.
Of course, custom fields alternative is covered up on the post alter screen. To see it, you have to tap on the ‘Screen Options’ catch at the best and after that check the custom fields choice.
This Screen Show You Advanced Custom Field IN Page
How Creating Fields In Advanced Custom Field
Creating new custom fields is a very easy process and can be done with just a few clicks of our user friendly field builder! You can create as many fields as you like, each with their own name, type and settings. Each field is added to a group which allows you to both organize your fields and specify the edit screens where they appear.
How To Displaying Fields In WordPress Theme
Displaying field values is ACF’s party piece! Any field value can be returned as a PHP variable or output as HTML via the magical functions
the_field(). These functions (alongside many others) provide a developer friendly way to customize your WordPress theme without spending hours reading our docs!
Here is some example code to see how our intuitive API works!
<h1><?php the_title(); ?></h1>
<?php if( get_field('sub_heading') ): ?>
<h2><?php the_field('sub_heading'); ?></h2>
<?php endif; ?>
<?php $image = get_field('hero_image'); ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php if( have_rows('event') ): ?>
<?php while( have_rows('event') ): the_row(); ?>
<a href="<?php the_sub_field('url'); ?>"><?php the_sub_field('title'); ?></a>
<?php endwhile; ?>
<?php endif; ?>