Shortcode returning localized HTML part

Using your comments, I found what I was missing. I initialized my textdomain with : add_action(‘admin_init’, ‘related_post_shortcode_init’); function related_post_shortcode_init() { load_plugin_textdomain(‘related-post-shortcode’, false, basename( dirname( __FILE__ ) ) . ‘/i18n’ ); } So, the textdomain was ok and ready for back-office translations (admin_init), but not for front, as @Mark Kaplun suggested. I simply added another hook … Read more

Remove   from shortcode

This could be due to the do_shortcode running through wpautop, see here for details on disabling that: https://stackoverflow.com/questions/5940854/disable-automatic-formatting-inside-wordpress-shortcodes But as frogg3862 said, what you need to do instead of that is to just trim out the beginning and ending whitespace from $content to prevent the non-breaking space from being automatically added. function infoButton($atts, $content = … Read more

How create a Shortcode with hover and complex options

Gradient and boxshadow are fine to put inline. Your trouble will be with the hover states. Luckily there is a trick. You can put the hover styles in an outer element and force inherit on hover. Like this: <div class=”myshortcode”> <a style=”color:blue;”><span style=”color:red;”>Content</span></a> </div> In your style.css you add this generic line with a transition … Read more