Hi Calin,
I have been investigating hard and finally found there was a temporary issue with PHP version upgrade at the hosting provider side.
Thanks for reply anyway!
The same problem. Until last week everythink OK. Today – Failed to contact the templates API server. I have done no update of the core, no plugins updates, no changes on server side… Any help?
Yes, I have this field already translated. The point is, a string from that field does not get displayed in the front end…
Thank you Vlad.
I think this might be the same issue I am experiencing: https://forum.tagdiv.com/topic/bug-infinite-loading-for-single-posts-on-ios
The code above has been cut off. Have tried several times, cannot modify it any more, please delete it…
Hi,
for those interested, below is the code I have gone with. In my case, I created a shortcode and pasted it in the content area of the text block placed in an inner row inside the single featured background image block (by the way, why the pure HTML block doesn’t accept shortcodes?)
<?php global $wp_query, $post, $tdb_state_single;
$post_id = $tdb_state_single->get_wp_query()->post->ID;
$post_title = $tdb_state_single->get_wp_query()->post->post_title;
$td_post_video = get_post_meta($post_id, 'td_post_video', true); ?>
<div class="my_wrap_icon_style">
" data-mfp-src="<?php echo $td_post_video['td_video'];?>">
<span><i class="tds-icon tdc-font-tdmp tdc-font-tdmp-play-round1 my_icon_style"></i></span>
</div>
Vlad, I have managed the first half of the task. I am able to retrieve the featured video URL using following snippet inside any single post template:
global $wp_query, $post, $tdb_state_single;
$post_id = $tdb_state_single->get_wp_query()->post->ID;
$post_title = $tdb_state_single->get_wp_query()->post->post_title;
$td_post_video = get_post_meta($post_id, 'td_post_video', true);
I have found the answer inside tdb_view_single.php
Thanks Vlad!
It works inside the post. I have already achieved it also using td_post_video meta keys.
The issue is that I would like to make the snippet work in a single page template. But, it does not work there… Any ideas to point me?
One example of the use could be to update an icon block or a button block via theme API in a way we clould use the featured video URL in the video popup field…
Thanks!
-
This reply was modified 6 years by
manasek.
I vote for this!!