Skip to content

Instantly share code, notes, and snippets.

@zulfnore
Last active August 29, 2015 14:13
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 zulfnore/201d5cb82fc07809316b to your computer and use it in GitHub Desktop.
Save zulfnore/201d5cb82fc07809316b to your computer and use it in GitHub Desktop.
Amended single.php for Ridizain
<?php
/**
* The Template for displaying all single posts
* This amendment is in reference to: https://wordpress.org/support/topic/query-about-ad-placement?replies=7
*
* @package Ridizain
* @since Ridizain 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
if ( function_exists( 'get_author_bio_box' ) ) {
echo get_author_bio_box();
} ?>
<!-- Place your ad code here -->
<?php wp_related_posts();
// Previous/next post navigation.
ridizain_post_nav();
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();
@zulfnore
Copy link
Author

This gist assumes you have copied the single.php file in to your child theme and made the amendments there.

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