0
votes

I have created a Custom Field in my wordpress page: eg-custom-link

I would like to output the value of this in the Wordpress editor (not in a php template) If I wanted to echo this in a php template I could use:

 <?php $key="eg-custom-link"; 
          echo get_post_meta($post->ID, $key, true);?>

... but in this instance I would like to output the custom field using the wordpress text editor.

1
i would recommend a shortcode to do this.meck373

1 Answers

0
votes

I ended up using the following plugin to echo a custom field: https://wp-types.com/home/custom-fields-shortcodes/