Adding javascript to header of MetroMagazine theme

Don’t edit theme files. Your changes will be overwritten when your theme updates. Instead use a child theme and hook into the wp_head function. Add this to your child theme’s functions.php file. function add_js() { ?> <script> Your JavaScript goes here </script> <?php } add_action(‘wp_head’, ‘add_js’); BTW, as you have a commercial theme, you can … Read more

Remove Url Parameter WordPress

The “s” variable parameter is for the search term and is used when there’s a search on a WordPress site. If you have a form that users are filling out, there should be code similar to: <input type=”text” value=”<?php the_search_query(); ?>” name=”s” id=”s” /> Delete that input tag and the “s” will disappear.