...

/

Using Custom Field on the Frontend

Using Custom Field on the Frontend

Learn to display the value of a custom field on the frontend.

The values of a custom field are stored as post_meta when the post is stored. To access post_meta values, WordPress has a function get_post_meta(). However, since we are using the Advanced Custom Fields plugin, we have access to a function named get_field(). This function is superior to the native WordPress function as it handles the formatting depending upon the field type. The get_field() function fetches the value ...