GET THE META VALUE FOR CURRENT POST #
<?php
$value = function_exists('tpmeta_field')? tpmeta_field('meta_key_id_here') : '';
?>
GET THE META VALUE FOR SPECIFIC POST #
<?php
$value = function_exists('tpmeta_field')? tpmeta_field('meta_key_id_here', $post_id) : '';
?>
GET GALLERY IMAGES #
<?php
$tp_gallery_images = function_exists('tpmeta_gallery_field') ? tpmeta_gallery_field('gallery_meta_key') : ''; //tpmeta_gallery_field($string_ids, $size)
foreach($tp_gallery_images as $single_image_src){
echo $single_image_src['url'] ."<br>";
echo $single_image_src['alt'] ."<br>";
}
?>
GET SINGLE IMAGE #
<?php
$tp_image = function_exists('tpmeta_image_field') ? tpmeta_image_field('image_meta_key') : ''; // tpmeta_image_field($id, $size)
echo $tp_image['url'];
echo $tp_image['alt'];
?>
GET REPEATER DATA #
<?php
$tp_repeater = function_exists('tpmeta_field') ? tpmeta_field('repeater_meta_key') : ''; // tpmeta_field($meta_key, $post_id)
foreach($tp_repeater as $row){ // Iterate the data with loop
echo $row['repeater_sub_field_key'] // get the subfield value by repeater inner array field key
}
?>
ACCESS SINGLE IMAGE AND GALLERY IMAGES INSIDE REPEATER #
<?php
$tp_repeater = function_exists('tpmeta_field') ? tpmeta_field('repeater_meta_key') : ''; // tpmeta_field($meta_key, $post_id)
foreach($tp_repeater as $row){ // Iterate the data with loop
$gallery = tpmeta_gallery_images($row['repeater_sub_field_key'], 'image_size');
$image = tpmeta_image($row['repeater_sub_field_key'], 'image_size');
}
?>