Support » Plugin: Advanced Popups » GenerateBlocks – missing CSS

  • Absolutely loving how lightweight this plugin is, and I’m psyched that it just uses Gutenberg. However, it is not respecting my GenerateBlocks at all. Is there a way that I can get my GB blocks to display properly? Any PHP snippet or code change that will enable that? Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter smile9381

    (@smile9381)

    p.s. Would also love for the plugin to have a top-level link rather than be hidden in the settings menu. 🙂

    Hi there, I have had the same issue. Dont know if you still need help.

    Add this code snippet to your functions.php or Snippet plugin. This should work for you like it did for me. Had to do some digging to see what the CPT was called.

    add_filter( 'generateblocks_do_content', function( $content ) {
        $args = array(
            'post_type' => 'adp-popup',
            // 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;
    } );

    @nebin2010 Unfortunately your snippet didn’t work for me. I used the Snippets plugin to add the code as a PHP snippet. When that didn’t work I tried to add it directly to the bottom of my funcitons.php file but that created a few errors. Any suggestions?

    • This reply was modified 8 months, 3 weeks ago by Bryckroad.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘GenerateBlocks – missing CSS’ is closed to new replies.