[Support request] [FEATURE REQUEST] Elements to target child pages

Home Forums Support [Support request] [FEATURE REQUEST] Elements to target child pages

Home Forums Support [FEATURE REQUEST] Elements to target child pages

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1619881
    Fabien

    Hi,

    It would be great to be able (without a function) to target child pages (ancestors) using elements.

    Beaver Builder / Themer has this feature : https://share.getcloudapp.com/7Kub5KGo

    Thanks !

    Fabien

    #1620117
    David
    Staff
    Customer Support

    Hi there,

    we agree … it is something we are looking into 🙂

    #1620158
    Fabien

    Awesome !

    #1620312
    Fabien

    One more question, as the feature is not here yet.

    I am using the following function to display a right sidebar on my child pages :

    add_filter( 'generate_block_element_display', function( $display, $element_id ) {
    	
    	global $post;
    
        if ( 1560 === $element_id && (( is_page() && 932 == $post->post_parent )|| is_page(932) ) ) {
            $display = true;
        }
    
        return $display;
    }, 10, 2 );

    It works well, however the CSS related to the block is not always generated…

    #1620464
    Leo
    Staff
    Customer Support

    Sorry what is the CSS you are referring to here?

    Something you’ve added?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.