Support » Plugin: Slider, Gallery, and Carousel by MetaSlider - Responsive WordPress Plugin » Dev Question – How to add own CSS to admin preview?

  • Resolved Anja Deubzer


    Hello dear MetaSlider-Team,

    I have deactivated the MetaSlider-CSS because I made my own responsive style.
    But now if I click ‘Save & Preview’ I get a iframe with the slider without CSS. I understand why but – here comes the question – how can i add my css-Styles to this iframe?

    Adding it to my admin.css didn’t help since it is a iframe.
    Is there a filter, maybe with METASLIDER_DEFAULT_PARAMETERS?
    Any hint/help would be a big help πŸ™‚

    Thanks a lot

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor matchalabs


    Hi Anja,

    You would need to add your styling to the theme or via a custom CSS plugin.

    To view the styling you could create a test page with the slider instead of using the ‘Save & Preview’ feature as adding the custom CSS here isn’t possible as the filters are located in the theme which isn’t loaded in the admin.


    Thread Starter Anja Deubzer


    Hi Dave,
    and Thank you for your answer.

    I added the styling already to my child-theme but I was wondering how to add it to the preview frame because my client wants to see it there too.

    But since there is no way (no filter) to do that – I edited the iframe-HTML inside the plugin (ml-slider.php from line 549 on). I am aware that I need to redo that change with every update but I have a satisfied customer! πŸ™‚

    Maybe you consider offering a way to add custom-css to the preview for the pro-license users in the future?! I know this is a very special dev-request πŸ™‚

    Thanks again for your time

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dev Question – How to add own CSS to admin preview?’ is closed to new replies.