Hi Steve,
Please add this code to your child theme’s functions.php
add_filter( 'the_content', 'filter_the_content_in_the_main_loop', 999999999 );
function filter_the_content_in_the_main_loop( $content ) {
// Check if we're inside the main loop in a single post page.
if ( is_singular('post') && in_the_loop() && is_main_query() ) {
if ( in_category( "now-showing" ) ) {
return $content . '<div id="morebutton"><a href="/now-showing/rhinebeck"><button class="red">Other Films Playing in Rhinebeck</button></a><a href="/now-showing/woodstock"><button class="grey">Switch to Films Playing in Woodstock</button></a></div>';
}
if ( in_category( "now-showing-tinker-street" ) ) {
return $content . '<div id="morebutton"><a href="/now-showing/woodstock"><button class="red">Other Films Playing in Woodstock</button></a><a href="/now-showing/rhinebeck"><button class="grey">Switch to Films Playing in Rhinebeck</button></a></div>';
}
}
return $content;
}
As for the positioning, it’s done through this javascript
jQuery(".showtimes-moviepage")
.prependTo(".post-entry");
For that, please add this similar code to Theme Options > JS
jQuery(".showtimes-moviepage")
.prependTo(".single-post .entry-content");
Thanks!