Last active
January 26, 2017 05:18
-
-
Save jeffreysbrother/9f1c32fdbc0042857df464662db5b9a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//activate custom fields in wordpress and name that field. Replace 'about_blurb' below with the selected name (I don't think hyphens can be used here) | |
<?php $meta_value = get_post_meta($post->ID, 'about_blurb', true); | |
if (!empty($meta_value)) { | |
echo '<p>' . $meta_value . '</p>'; | |
} ?> | |
//however, we can use the Advanced Custom Fields plugin for something much better | |
//this goes in our template file: | |
<p><?php the_field( 'about_blurb' ); ?></p> | |
//then, in the plugin settings, we can create custom fields that will appear on certain pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment