Shortcode always at top of content

You can’t just print output from a shortcode, you have to return it. Easiest way given your existing code is to use an output buffer. You can modify your draw_chain_menu() method like this: //shortcode action public function draw_chain_menu($args) { // previous code omitted… ob_start(); $this->generate_tax_select($args); return ob_get_clean(); }

How to stop repeated hack on header.php of custom theme? [closed]

Check permissions on all WP folders. Check the htaccess file. Delete any unknown files throughout your hosting area. (Carefully.) Change all of your hosting passwords (including FTP accounts; delete any you don’t know). Strong passwords! Reinstall WP (from your admin – Dashboard, Updates). Reinstall all themes (deactivate, uninstall, reinstall, reactivate). Same for plugins (although header.php … Read more