Shortcode CSS stripped in WP Admin

Support MB Custom Post Type Shortcode CSS stripped in WP Admin

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43267
    Lee GBLee GB
    Participant

    Hi all,

    I'm trying to create a dev dashboard in the admin panel for a client site using Metabox Settings Page and a Bricks template to include contact details/simple form and a Services ordering block with a few buttons styled to match the my Brand.

    I've added the settings page, and created a CPT with a custom html field. Now I want to add in the template. I know I can do this via an iFrame, however that requires extra coding (JS) to get rid of the WP Admin bar. I would prefer not to add extra code if not necessary (as with various updates to WP and Plugins, there's always the possibility it breaks).

    My thoughts were to use the Shortcode provided by the Bricks Template. I used the PHP callback as suggested on this forum, however all CSS is stripped out and there is no styling at all.

    I've tried setting Sanitize to 'none' and adding CSS to the custom CSS tab in the template using !important, but neither works.

    Any remedies to get this to work would be great.

    Perhaps Metabox could add a field type of Shortcode, that would be nice 🙂

    Thanks for any help and suggestions, always appreciated.

    #43270
    PeterPeter
    Moderator

    Hello Lee,

    The field custom_html doesn't have an input field so no need to bypass the sanitization. I think the issue is the Bricks template is not designed to work in the admin area so the CSS code won't load.

    You can create a custom settings page with code, output the Bricks template and recheck this issue. Follow the documentation https://developer.wordpress.org/plugins/settings/custom-settings-page/
    Or contact Bricks support to get more information.

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