Support » Plugin: Widget Shortcode » Adding class to shortcode

  • mpc2474

    (@mpc2474)


    Our company had an external source create a custom search tool for our website. I insert the tool into our header using the following shortcode:

    [md_filter shop-page-slug=”test-search” theme-light-mode=”true”]
    [md_part_number_search shop-page-slug=”test-search” theme-light-mode=”true”]

    But the tool needs some styling before we feel comfortable launching it, because it currently displays pretty unattractively. I would like to add a class somewhere in the shortcode so that I can adjust CSS, or otherwise find an alternative means to style this so that we can implement it, but I’m a bit out of my depth. Is it possible to change the appearance of the tool this shortcode generates?

Viewing 1 replies (of 1 total)
  • Plugin Author shazdeh

    (@shazdeh)

    If you’re using the Widget Shortcode plugin, you can use the “container_class” parameter to add a custom classname to the widget on frontend, so for example:

    
    [widget id="text-1" container_class="my-widget"]
    

    Will display the widget with the specified ID, and adds “my-widget” CSS classname to it.

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Adding class to shortcode’ is closed to new replies.