How to remove addthis from my default template

try grepping your entire wordpress folder for ‘addthis’. From your root: grep -irn “addthis” *. It’s bound to be in there somewhere. Check in wp-content, because you want to search through your themes and plugins. wp-includes is part of WordPress core so I doubt it would contain any references to AddThis.

Using jquery migrate for plugins incompatible with jquery 1.10.2

You have a syntax error in your wp_register_script() call: wp_register_script(‘curtain-instance’, get_stylesheet_directory_uri().’/curtain-instance.min.js’, array(‘curtain’,’jquery’,’jquery-migrate’), true ); You’re missing the version parameter: wp_register_script( // Handle ‘curtain-instance’, // Path get_stylesheet_directory_uri().’/curtain-instance.min.js’, // Dependencies array(‘curtain’,’jquery’,’jquery-migrate’), // Version // In footer? true ); Try adding that parameter: wp_register_script( // Handle ‘curtain-instance’, // Path get_stylesheet_directory_uri().’/curtain-instance.min.js’, // Dependencies array(‘curtain’,’jquery’,’jquery-migrate’), // Version ‘1.0’, // In … Read more

Gallery plugin forces itself above text

Your shortcode function callback must return the output, like this: function gamma_gallery( $attr ) { $html=””; // your stuff, where all the output is assigned to the $html variable return $html; } or you could try the output buffering: function gamma_gallery( $attr ) { $html=””; ob_start(); // your stuff $html = ob_get_contents(); ob_end_clean(); return $html; … Read more

JQuery not working in my plugin [closed]

You’re using an invalid action: add_action(‘wp_enqueue_script’, ‘run_js_script’); The correct action is wp_enqueue_scripts (plural), not wp_enqueue_script (singular). Use this instead: add_action(‘wp_enqueue_scripts’, ‘run_js_script’); Edit Same problem here: add_action(‘wp_register_script’, ‘register_script’); Just hook it into wp_enqueue_scripts for simplicity: add_action(‘wp_enqueue_scripts’, ‘register_script’); Actually, two better options: Put your wp_register_script() call in the same run_js_script callback as your wp_enqueue_script() call. Eliminate wp_register_script() … Read more

Adding custom code to a WordPress site

If your custom code should output something where normally you have post content, use a shortcode. Convert your code in a plugin, this can be done simply adding plugins header, even only <?php /** * Plugin Name: My Plugin */ on top of your php file. More info here. After that use the add_shortcode function … Read more