Site logo

[Support request] Stackable Theme Integration

Home Forums Support [Support request] Stackable Theme Integration

Home Forums Support Stackable Theme Integration

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2506359
    Rafael

    Hi Generate Press Peeps,

    I am about to use Stackable Gutenberg blocks plugin and they have a Theme Integration Guide:

    https://docs.wpstackable.com/article/429-theme-integration-guide

    Quote:
    Theme’s Content Width
    Some functionality in Stackable uses your theme’s content width. To ensure the width is easily detected, make sure you define it in the theme’s functions.php file:

    global $content_width;
    $content_width = 640;<br>

    Is this a necessary step with GP and/or what steps do you recommend?

    Rafael

    #2506444
    Leo
    Staff
    Customer Support

    Hi Rafael,

    I’m not familiar with Stackable Gutenberg blocks plugin so cannot comment on if this is a necessary step.

    Can you check with their support team first to see if they can point you in the right direction to determine this?

    GP’s container width is defined in the customizer:
    https://docs.generatepress.com/article/container-width/

    Let me know 🙂

    #2506524
    Rafael

    Tech,

    Does GP use the following code below to create the container width:

    global $content_width;
    $content_width = 640;<br>

    If GP does, I am assuming that Stackable blocks will be able to see it?

    I also posted in the FB group.

    Rafael

    #2506988
    David
    Staff
    Customer Support

    Hi there,

    no GP does not register that global variable.
    i don’t know why they want the theme to add it….
    if you need it then you can add it using this PHP snippet:

    add_action( 'after_setup_theme', function(){
        global $content_width;
        $content_width = 640;
    });

    This doc explains how to add PHP:
    https://docs.generatepress.com/article/adding-php/

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