• When using Content Visibility within Divi’s Theme Builder, the Content Visibility part of the module pulls in and combines both the Post ID and the Theme Builder ID. Thus making the Content Visibility tool useless as it cannot recognize the current page ID. Please help. Thank you!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jonathan Horowitz

    (@jhorowitz)

    Hi @bradthebluefish,

    Could you please provide more details? What expression are you using and what are your actual versus expected outcomes?

    Thanks!

    Thread Starter bradthebluefish

    (@bradthebluefish)

    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.

    Thread Starter bradthebluefish

    (@bradthebluefish)

    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.

    Thread Starter bradthebluefish

    (@bradthebluefish)

    Any thoughts about this? Why does the plugin not properly work when used within the Theme Builder portion of Divi?

    Thread Starter bradthebluefish

    (@bradthebluefish)

    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?

    Plugin Author Jonathan Horowitz

    (@jhorowitz)

    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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Divi’s Theme Builder – Combined Post ID’ is closed to new replies.