- This topic has 7 replies, 3 voices, and was last updated 2 months, 4 weeks ago by
David.
-
AuthorPosts
-
May 13, 2022 at 4:18 am #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.
Any help would be much appreciated!
Many thanks!
May 13, 2022 at 5:26 am #2218400David
StaffCustomer SupportHi there,
go to Dashboard > GenerateBlocks > Settings and change the Dynamic CSS to Inline.
Does that work ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 13, 2022 at 5:51 am #2218414spicerdigital
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.
May 13, 2022 at 8:02 am #2218719Leo
StaffCustomer SupportI believe this should help:
https://docs.generateblocks.com/article/adding-content-sources-for-dynamic-css-generation/Examples: https://wordpress.org/support/topic/use-with-advanced-ads-and-popup-maker/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 17, 2022 at 2:51 am #2222096spicerdigital
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.
May 17, 2022 at 9:03 am #2222800David
StaffCustomer SupportTry 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; } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 17, 2022 at 9:37 am #2222829spicerdigital
Boom! Fabulous. It works!
Thank you both for your help 😀
May 17, 2022 at 9:47 am #2222832David
StaffCustomer SupportAwesome – glad to hear that!!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.