Placing tags on wordpress visual editor using shortcodes

Assuming you don’t have the shortcode written down… function search_shortcode() { $struct=”<div class=”searchbar” ><div class=”searchbar-inner” >search <input type=”text” id=”search” /><span class=”result-count” ></span></div></div>”; return $struct; } add_shortcode(‘search_box’, ‘search_shortcode’); Make sure your editor is in the ‘HTML’ mode, and paste the shortcode as ‘search_box’. Using a shortcode will allow you to reuse this form anywhere you want.

jQuery UI styles conflicting with TinyMCE dialog

It should work just fine if you enqueue your script & stylesheet within functions.php file. This is how I do that (feel free to copy & paste, it should work out of the box): function load_my_admin_js() { wp_register_script(‘jquery-ui’,”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js”); wp_enqueue_script(‘jquery-ui’); } add_action(‘admin_init’, ‘load_my_admin_js’); function load_my_admin_css() { wp_enqueue_style( ‘jquery-ui’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css’); } add_action( ‘admin_print_styles’, ‘load_my_admin_css’); Don’t forget to … Read more