Add checkbox to activate shortcode in post
-
I have a shortcode I wrote to collapse widget divs around ads when they aren’t being supplied by google. This is to collapse the outer div that isn’t affected by the google collapse empty divs script.
The code works but I’d like an easier way to use it for my authors by just clicking a checkbox to enable the shortcode. Any ideas on good places to start looking at this?
Search terms I guess were a bit broad.
btw the code is painfully simple, just want to invoke some style based on the shortcode.
function dck_outeradwidgetcollapse () {
echo ‘<style>.ad {margin:none !important; border:none !important;} .skyscraper {margin:none !important;}</style>’;
}
The topic ‘Add checkbox to activate shortcode in post’ is closed to new replies.