• Resolved spicerldn

    (@spicerldn)


    Hello there!

    I am using the 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…

    This was displaying correctly yesterday but not today, for some reason :/

    Button styling in editor

    Button styling on frontend

    I’m using GeneratePress Pro (latest version).

    Any advice gratefully received!

    Many thanks!

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Dear @spicerldn ,

    Thanks for sharing with us.
    Judging from the info we had so far it’s a style conflict.

    So, if it worked the other day correctly but not now, could you tell us what changed? Maybe you installed a new plugin/theme or updated one?
    Something should have caused this and we would like to know what changes were made before.

    Thanks beforehand.

    Thread Starter spicerldn

    (@spicerldn)

    Hi there

    Thanks for the reply.

    All I did was change the size and the line height of 2 headings fonts in the customiser. It was after I did this that the button styling disappeared on the frontend. I reverted the changes but it still looks as per my attached images.

    Dear @spicerldn ,

    Could you let us know whether you cleared cache after reverting the changes? It’s possible some caching issue exists and that’s why the button appearance didn’t change to the original one.

    Please, let us know.

    Thread Starter spicerldn

    (@spicerldn)

    Hi there

    Yes, I cleared the cache each time I made a change but it’s still the same.

    It seems to be treating the button as a link, not a button (colours are the same as the link display settings in the customiser.)

    I have also raised a ticket with Generatepress to see if they can help.

    Whatever I do, it doesn’t show button styling on the frontend.

    Dear @spicerldn ,

    Could you export the popup and send it to [email protected]?
    You can use wetransfer.com to send the file.
    In case you need the article on exporting the popup, please, find it under the following link:

    How to Import/Export Popups

    P.S. When sending, please, mention this thread so the case can be easily identified.

    Thread Starter spicerldn

    (@spicerldn)

    Hi there

    Support at GeneratePress said the following:

    GenerateBlocks styling is built to work within your content area.

    When it comes to third-party locations, integration needs to be specifically added: https://docs.generateblocks.com/article/adding-content-sources-for-dynamic-css-generation/

    I have tried to add this to functions.php but I’m not sure if I have the plugin id correct?

    add_filter( 'generateblocks_do_content', function( $content ) {
        $post_ids = array( 5772, 5841, 5843 ); // A post ID to check the content of. Can be dynamically set.
    
        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;
    } );

    Please can you advise?

    Many thanks!

    Spicer

    Thread Starter spicerldn

    (@spicerldn)

    Could you export the popup and send it to [email protected]?

    Email sent.

    Thread Starter spicerldn

    (@spicerldn)

    I have been provided with a solution!

    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;
    } );

    Thank you for all your help and for looking into this for me.

    ??

    Dear @spicerldn ,

    You are welcome ??
    We are glad to be a help.

    If anything else comes up, do not hesitate on getting back to us.

    Thanks,
    Popup Builder Team

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Button styling not showing on live site’ is closed to new replies.