Skip to main content

Can we load FC CSS variables outside of the community?

I'd love to be able to style other parts of my WordPress website using the FC CSS variables (ie. colors, text size etc.) to keep things as consistent as possible. Is there an easy way to access these variables?

Thomas Oates

I've got this in my theme's functions.php file in the wp_enqueue_scripts action function that I think does this. I'm using the FC page templates for all my regular WordPress pages so I'm honestly not sure if this line is needed when using the FC page templates (the templates may load it automatically).

wp_enqueue_style( 'fcstyle', '/wp-content/plugins/fluent-community/assets/app.css' );

Bryan William

Thomas OatesΒ how does this code work? Can you please tell me more

Thomas Oates

Bryan WilliamΒ Here's the entire function from my theme's functions.php file. It first loads the stylesheet for the theme and the second line loads the app.css stylesheet from FluentCommunity.

    add_action( 'wp_enqueue_scripts', 'theme_load_css_and_js' );
    function theme_load_css_and_js() {
        wp_enqueue_style( 'style', get_stylesheet_uri() );
        wp_enqueue_style( 'fcstyle', '/wp-content/plugins/fluent-community/assets/app.css' );
    }

Stuart McKelvie

Thomas OatesΒ thanks! I ended up getting it working, although the Ninjas have added a bunch of default WordPress content styling, which made editing some pages in Bricks a little more complicated.