0

I am making one plugin which has functionality using shortcode , While shortcode will place in the page , it will return a well desgin form For example : https://www.screencast.com/t/XTteV6u8qw

Now if I add bootstrap css/classes my current theme went messed up,

I want functionality like in any theme my shortcode function display design will remain same. Any idea about how it is possible ?

Any information on this would be greatly appreciated. Thanks!

1

1 Answer 1

1

You could write the internal css of that shortcode content like below example.

function shortcode_func( $atts ) {

   $returnString = '<style>';
   $returnString .='#shortcode-id{background-color:yello;}';
   $returnString .= '</style>';

   $returnString .='<div id="shortcode-id"></div>';
   return $returnString;
}

add_shortcode( 'shortcode-name', 'shortcode_func' );

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.