brainstormforce / bb-header-footer

Create Header and Footer for your site using Beaver Builder page builder.
https://wordpress.org/plugins/bb-header-footer/
14 stars 15 forks source link

Theme not supported, but using BB Theme child-theme #23

Open jfarsen opened 7 years ago

jfarsen commented 7 years ago

Hi,

This looks great, but I get the error that our theme isn't supported.

We're using the BB Agency plugin and BB Theme but a child theme. The difference might be that we're running WP multisite, and we've network enabled the Child Theme, but not the BB theme (as we don't want sub-sites to be able to choose the BB theme, only the child (hence not activated).

Would it be possible to detect if we're using a child theme?

jfarsen commented 7 years ago

In a related note, the plugin works perfectly, that I can tell.

So it's only that error msg that gets triggered, but no ill effect.

Nikschavan commented 7 years ago

Can you tell me what is the folder name of you theme?

Have you modified the bb theme somehow?

jfarsen commented 7 years ago

Sure. The parent theme's folder name is unchanged, at /themes/bb-theme/. The child-theme's folder name is /themes/bb-csynchro/

I've done zero changes to the BB parent theme. We never do that.

Nikschavan commented 7 years ago

Ok This should not be happening, The plugin checks for the theme/parent theme template using get_template() function, in case of using a child theme it correctly returns the slug of parent theme.

Can you add this bit of code to your child theme's functions.php

function child_theme_get_template() {
    var_dump( get_template() );

    return '';
}

add_action( 'update_footer', 'child_theme_get_template', 99 );

This will print the template name in the admin footer area like this, Can you copy and paste that info here?

After you copy that remove this above code from your child theme.

jfarsen commented 7 years ago

Sure thing, the result is this : string(8) "bb-theme" :(

Nikschavan commented 7 years ago

What is the exact error message? Can you give a screenshot of the notice?

jfarsen commented 7 years ago

Hey, I think I have another clue ... since it's a Multisite, on the "micro-sites" that use the bb-child, it's fine. But on the main site (landing page), which uses a different theme, the error message appears, since it's using a different theme. screen shot 2017-02-16 at 16 05 56

Nikschavan commented 7 years ago

Ha! That explains it, I will make this notice dismissable so that this can be removed in such cases.