Hi @bradthebluefish,
Could you please provide more details? What expression are you using and what are your actual versus expected outcomes?
Thanks!
I am using the following expression…
function visibility_acf_video() {
global $post;
$result = true;
$video = get_field('video', $post_id);
if( empty($video) ):
$result = false;
endif;
return $result;
}
However, the $post_id contains combines two IDs. I get both the post ID (625) and theme builder ID (774) for the final value of 625774.
$post_id = rtrim($post->ID, "774");
I eventually added the above code as a temporary solution but actually, this does not work even though it produces the 625 value (after trimming)
Please note that I have used this product in the past, just never in conjunction with the Theme Builder.
Hi Jonathan. Any luck in replicating this issue?
Just to clarify, the code I was originally using was…
function visibility_acf_video() {
$result = true;
$video = get_field('video');
if( empty($video) ):
$result = false;
endif;
return $result;
}
But then I got creative in order to trim the combined IDs that I was getting…
function visibility_acf_video() {
global $post;
$post_id = rtrim($post->ID, "774");
$result = true;
$video = get_field('video', $post_id);
if( empty($video) ):
$result = false;
endif;
return $result;
}
Unfortunately, the additional code did not work even though it produced the post ID I needed. Make me think something even deeper is going on with the plugin.
Any thoughts about this? Why does the plugin not properly work when used within the Theme Builder portion of Divi?
Hi Jonathan Horowitz (@jhorowitz),
Will your plugin Content Visibility for Divi Builder be supporting Divi’s Theme Builder?
If not, shouldn’t this lack of support be noted in your plugin’s description and FAQ?
Hi @bradthebluefish,
We have just released v3.20 of Content Visibility for Divi Builder which resolved issues with the Theme Builder. It may also solve your issue here; could you please update and let us know how it goes? Thank you!