Brand Assets

Thanks for your interest in affiliating with Popup Maker

Below are a few guidelines for using Popup Maker’s brand resources, please take a moment to familiarize yourself with them. You can download individual assets in each section, or you can download everything all at once below.

Download All Assets

Our Name is Popup Maker

Popup Maker is two words. Always capitalize the P and the M.

Brand Name

PopupMaker

Not like this.

popup maker

Not like this.

POPUP MAKER

Not like this.

popupmaker

Not like this.

Popup Maker Colors

These are Popup Maker’s brand colors – copy the color codes below.

Brand Colors

Primary

#1dbe61

Light

#21db6f

Base

#1dbe61

Popup Maker Logo

These are Popup Maker’s marks & logos – copy or download in PNG/SVG format.

Logos & Marks

Not yet an affiliate?

Become an Affiliate
Earn commission when you recommend Popup Maker to your friends, fans & clients.
Sign Up

Popup Maker Historical Branding

These are Popup Maker’s past marks, logos & colors. Here for fun and archives.

Historical Marks, Logos & Colors
Popup Maker Logo - Archived
Popup Maker Logo - Archived
Popup Maker - Mark - Archived
Popup Maker - Mark - Archived

Primary

#9ab927

Light

#a8cb29

Base

#2d2d2d

Gray 1

#626262

Gray 2

#cacaca

Gray 3

#dfdfdf
View Categories

How to Get GenerateBlocks to Work In a Popup

If your GenerateBlocks blocks aren’t showing up or they don’t look right in your popup, this guide will show you how to fix that.

Heads Up! Starting around GenerateBlocks version 1.9.0, you should see GenerateBlocks styles working fine inside a popup without using the custom code we’ve documented here.

We plan to deprecate (retire) this document soon. But we’ll keep it posted for now for people who are still on GenerateBlocks versions before 1.9.0.

Demo of the Problem #

Here’s a quick demo of the problem.

This is what’s going on in the demo: #

  1. First, we see our popup content in the Blocks editor, and it looks good.
  2. But when the popup displays, the heading, button, and query loop don’t look right. E.g., heading colors are wrong.
  3. We turn on our code snippet that fixes the problem (details below).
  4. After we reload the popup, the headings, button, and query loop all work great! Just like we see in the block editor.

Why does this happen? #

Popup Maker popups get inserted (loaded) at the bottom of posts and pages. This is generally how popups, modals, and slide-ins work. That’s because popups need to be “off-screen” until they’re triggered to show up.

GenerateBlocks Only Looks in the Main Content Body #

Here’s the kicker. GenerateBlocks won’t see anything outside of the standard post/page area by default. That means GenerateBlocks will not know if you have GenerateBlocks in a popup. That’s why your popup looks broken.

The Fix #

Tell GenerateBlocks There Are GenerateBlocks Blocks Inside Your Popup #

Luckily the GenerateBlocks team developed a hook for special cases like popups. This hook is a WordPress filter that tells GenerateBlocks about content outside the normal area.

I used the documented GenerateBlocks fix and tweaked it for my specific popup. It works like a charm. Here’s the exact snippet I’m using on my site.

/*
 * This solution should be the accepted answer in this forum thread.
 * 
 * https://generatepress.com/forums/topic/gpgbpopup-maker-issue/#post-2088153
 */
add_filter( 'generateblocks_do_content', function( $content ) {
    $post_id = 467; // Change to your Popup Maker popup ID https://5fb604e7-99fd-4dcb-a5ef-268749498baa.express.conves.io/docs/manage-features-or-options/find-the-popup-id/

    if ( has_blocks( $post_id ) ) {
        $block_element = get_post( $post_id );

	// Where 'popup' is the custom post type for Popup Maker popups.
	// The original text from the GenerateBlocks doc is 'your_post_type'
	// https://docs.generateblocks.com/article/adding-content-sources-for-dynamic-css-generation/
        if ( ! $block_element || '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;
} );

See the original source https://gist.github.com/marklchaves/891586c49231889f86601f366d8c136c

Please change the popup ID number in that example to your popup ID number. That should be the only change you need.

Reference: https://docs.generateblocks.com/article/adding-content-sources-for-dynamic-css-generation/

Leave the first comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.