You need to put that code in the php file of your child theme relative to where you want it to appear and on what pages. So if you want it to appear on a blog page you would place it in your single.php file right under your call for content ( the_content() )
Alternatively, if you’re putting it in your functions.php and you wanted it to show up after your content you could put it in a function like this:
function poll_after_the_content( $content ) {
$custom_content = $content;
if( current_user_can('editor') || current_user_can('administrator')) {
$custom_content .= '<h2>I am an admin or editor!</h2>';
// stuff here for admins or editors
}
return $custom_content;
}
add_filter( 'the_content', 'poll_after_the_content' );
This code would add “I am an admin or editor!” to all posts/pages when logged in as an admin or editor.
Change this line:
$custom_content .= '<h2>I am an admin or editor!</h2>';
to
$custom_content .= do_shortcode ('[your_short_code]');
to echo out your poll after the content.