How to get jetengine’s meta field in php

How to get jetengine's meta field in php

Some of developers want to get page/posts meta fields in php code and want to run query with it or create shortcode and get jetengine’s meta field in it.

There are 2 methods to get post/page meta field created via Jetenigine Plugin.

  • Jetengine method.
  • WordPress default method.

Jetenigne method

$page_links = jet_engine()->listings->data->get_meta( 'related-extra-pages-link' );

echo '<p>' . $page_links . '</p>'; 

WordPress default method

get_the_ID() is post/page id. you can also type it like e.g. 14 or 55.

$page_links = get_post_meta( get_the_ID(), 'related-extra-pages-link', true );

echo '<p>' . $page_links . '</p>'; 

Hope this help you to create a better website and solve your problem 🙂

get jetengine’s term meta field value in php

GitHub Gist link

More Articles