How to call custom field value: WordPress
November 11, 2011
Custom field play very big role in Wordpress. We can use it to call extra feature in post and page. For example (only to show custom field functionality), if you want to add a source url in your every post. You can do it using two method:
- Just write the source url in your post
- Use Custom field
Now here we will prefer 2nd option. You just need to add a "custom field id" and its value. I am using "source_url" for "custom field id" and "http://www.domain-name.com" as value. Please see the attached image below
:
Below is the code to call custom field value. Just need to put this in your theme file.