Last active
June 11, 2021 11:24
-
-
Save wireinet/e95393acbb15d21e42fee6f686256238 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Вывод картинок в templates --> | |
[each progress_images]<a class="foobox" rel="gallery" href="{@guid}">{@_img.large}</a>[/each] | |
<!-- с глобальными переменными globals.php --> | |
require ('globals.php'); | |
$phone_number = get_option('POD NAME_OPTION NAME'); | |
<!--Вывести опцию из админки--> | |
get_option('POD NAME_OPTION NAME') | |
<!-- Вывести template--> | |
echo pods('POD NAME', $post->ID )->template( 'TEMPLATE NAME' ); | |
<!-- Вывести значение--> | |
echo get_post_meta($post->ID, PODNAME, true); | |
<!-- Шорткод шаблон для вывода PODS template--> | |
[pods name="site_settings" id="test" template="render_whatsapp"] | |
<!-- переименовать more fields--> | |
add_filter('pods_meta_default_box_title', 'gnt_pods_meta_title', 10, 5); | |
function gnt_pods_meta_title($title, $pod, $fields, $pod_type, $pod_name) { | |
if (!empty($fields)) { | |
$title = $pod['label']; | |
} | |
return $title; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment