fbpx
35 C
Lahore

Wordpess: How to display the WCK Plugin’s Custom fields in the page or post?

Must read

Ayyaz Zafarhttps://www.ayyaztech.com
I am Full Stack Web Developer with 10 years of professional Experience. I have following Skills: HTML5, CSS3, Javascript, jQuery, Ajax, PHP, MySQL, jQuery, Angular, React.js, Wordpress, Codeigniter, Laravel, Node.js, Mongo DB, Express.js, GraphQL, Typescript, Apollo and many more..
$meta =  get_post_meta(get_the_ID(), 'name_of_meta', true);  // name_of_meta is the name of meta box linked the the current post ID.
$meta = $meta[0];

// Now in $meta variable we have all fields available in this meta box which we added in the WCK custom fields section.

// We can access fields as shown below:

echo $meta['field1'];

 

- Advertisement -spot_img

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article