[Resolved] Button styling missing on frontend using Popup Builder plugin

Home Forums Support [Resolved] Button styling missing on frontend using Popup Builder plugin

Home Forums Support Button styling missing on frontend using Popup Builder plugin

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2218335
    spicerdigital

    Hello there!

    I am using the Popup Builder plugin to create popups to display further information when clicked and that all works well and looks great!

    However, I have created a button within the popup to take the user to the booking page and the button styling on the backend is not showing up on the frontend. Click on (Learn More) button on each treatment section to view pop ups.

    Button styling in editor

    Button styling on frontend

    Any help would be much appreciated!

    Many thanks!

    #2218400
    David
    Staff
    Customer Support

    Hi there,

    go to Dashboard > GenerateBlocks > Settings and change the Dynamic CSS to Inline.

    Does that work ?

    #2218414
    spicerdigital

    Hi David

    Thanks for your reply.

    No, it doesn’t appear to make any difference.The colours showing are those of links as per the customiser, so it’s not showing button styling but treating it as a link for some reason.

    #2218719
    Leo
    Staff
    Customer Support
    #2222096
    spicerdigital

    Hi there

    Thanks for the info.

    I have added this to functions.php:

    
    add_filter( 'generateblocks_do_content', function( $content ) {
        $post_ids = array( 5772, 5841, 5843 ); 
    	
        foreach ( $post_ids as $post_id ) {
            if ( has_blocks( $post_id ) ) {
                $block_element = get_post( $post_id );
    
                if ( ! $block_element || 'sg_popup' !== $block_element->post_type ) {
                    return $content;
                }
    
                if ( 'publish' !== $block_element->post_status || ! empty( $block_element->post_password ) ) {
                    return $content;
                }
    
                $content .= $block_element->post_content;
            }
        }
    
        return $content;
    } );
    

    It hasn’t changed the styling and I’m not sure what I’m doing wrong (I’m PHP illiterate…) I’ve raised a support ticket with the plugin dev and sent them the coding and the info you sent above, but haven’t heard back yet.

    #2222800
    David
    Staff
    Customer Support

    Try adding this snippet:

    add_filter( 'generateblocks_do_content', function( $content ) {
        $args = array(
            'post_type' => 'popupbuilder',
            // Other args if you need them.
        );
    
        $posts = get_posts( $args );
    
        foreach ( (array) $posts as $post ) {
            if ( isset( $post->post_content ) ) {
                $content .= $post->post_content;
            }
        }
    
        return $content;
    } );
    #2222829
    spicerdigital

    Boom! Fabulous. It works!

    Thank you both for your help 😀

    #2222832
    David
    Staff
    Customer Support

    Awesome – glad to hear that!!

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