Skip to content

Instantly share code, notes, and snippets.

@JudeRosario
Created September 14, 2015 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JudeRosario/940dde93ad15438a60b9 to your computer and use it in GitHub Desktop.
Save JudeRosario/940dde93ad15438a60b9 to your computer and use it in GitHub Desktop.
Move div to top of page
add_action('wp_footer', 'custom_JS') ;
function custom_JS() {
echo <<<'JS'
<script type="text/javascript">
jQuery(document).ready(function ($) {
var element = $('#mobile').detach();
$('#header').append(element);
});
</script>
JS;
}
@JudeRosario
Copy link
Author

Just copy/paste the code into the functions.php file of your child theme or a site specific plugin if you use one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment