How to Display Custom Fields From a Specific Post Outside the Loop in WordPress
Custom fields allow you to add extra meta data to your website, but sometimes this really doesn’t fit the design of your website. In particular, sometimes these extra fields do not belong with the other post content inside the loop and need to break out of the loop to have a meaningful impact on your website. Custom fields are enabled in the screen option in the menus option of WordPress and lumped in with other content. For example, creating a custom field for your relationship status might not belong with your other post content.
How To Get Custom Fields Outside The Loop In WordPress
WordPress stores all the data into its MySQL database, so we will just made a MySQL query to get the custom field value outside the loop of your post. In short, here’s a nice trick to get custom fields outside the loop of your WordPress posts and pages.