Created
June 20, 2018 14:39
-
-
Save joshfeck/ab7aaf8c50ca7030c32fb0da4c234c01 to your computer and use it in GitHub Desktop.
Adds a shortcode to move some intro text to a new location between the first and second event in the list. Place [move_intro_text] onto the page along with the [ESPRESSO_EVENTS] shortcode. Add the following PHP code to a site specific plugin or into the child theme's functions.php file.
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
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_shortcode('move_intro_text', 'my_move_intro_text_shortcode'); | |
function my_move_intro_text_shortcode() { | |
return '<script>jQuery( document ).ready(function( $ ) { | |
$( "article.espresso_events" ).first().after( $( "#intro-text-for-events" ) ); | |
});</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment