Created
August 31, 2015 15:19
-
-
Save JudeRosario/bbb60d394332cdb2a9b3 to your computer and use it in GitHub Desktop.
Events + Reverse Order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_footer', 'custom_JS') ; | |
function custom_JS() { | |
echo <<<JS | |
<script type="text/javascript"> | |
jQuery(document).ready(function () { | |
if(window.location.href.indexOf("/events/") > -1) { | |
ul = jQuery('#content'); | |
ul.children().each(function(i,li){ul.prepend(li)}) | |
} | |
}); | |
</script> | |
JS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just copy/paste the code into the functions.php file of your child theme or a site specific plugin if you use one.