Title: Blank Output
Last modified: August 30, 2016

---

# Blank Output

 *  Resolved [psimatrix](https://wordpress.org/support/users/psimatrix/)
 * (@psimatrix)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/blank-output/)
 * I get an absolutely blank page response when trying to use this in my custom 
   theme template:
 *     ```
       // check if the function exists
       				$post_id = get_the_id();
       				if ( function_exists( 'km_rpbt_related_posts_by_taxonomy' ) ) {
       				  	$args = array(
       						'posts_per_page' => 10,
       						'exclude_terms'  => array( 12, 34 ),
       					);
   
       					$taxonomies = array( 'category', 'post_tag' );
   
       					$related_posts = km_rpbt_related_posts_by_taxonomy( $post_id, $taxonomies, $args );
   
       					if ( $related_posts ) {
       				 		foreach ( (array) $related_posts as $related ) {
   
       				 		?>
                               <div class="col-tn-12 col-xs-6 col-tx-6 col-sm-3 col-md-3 col-lg-4 bleed-left bleed-top gutter-bottom">
   
                                   <?php echo '<li><a style="color:green;" href="' . get_permalink( $related->ID ) . '">' . $related->post_title . '</a></li>'; ?>
   
                               </div>
       						<?php
                               }
   
       					}
       				}
       ```
   
 * [https://wordpress.org/plugins/related-posts-by-taxonomy/](https://wordpress.org/plugins/related-posts-by-taxonomy/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/blank-output/#post-6692266)
 * Hi psimatrix
 * Is this the full content of the template?
 *  Thread Starter [psimatrix](https://wordpress.org/support/users/psimatrix/)
 * (@psimatrix)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/blank-output/#post-6692384)
 * No it’s not. It’s the contents of a function I call throughout my theme as a 
   wrapper.
 * The specific line that prevents output is:
 * `$related_posts = km_rpbt_related_posts_by_taxonomy( $post_id, $taxonomies, $
   args );`
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/blank-output/#post-6692392)
 * Sorry for the late reply.
 * Are you using any of the filters in your theme’s functions.php
    [https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/filters/](https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/filters/)
 * Specifically this one
    [https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/filters/#related_posts_by_taxonomy](https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/filters/#related_posts_by_taxonomy)
 * Are you sure the post id is available. For testing try changing this
 *     ```
       $post_id = get_the_id();
       ```
   
 * to this
 *     ```
       $post_id = get_the_id();
       echo 'post ID = ' . $post_id;
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Blank Output’ is closed to new replies.

 * ![](https://ps.w.org/related-posts-by-taxonomy/assets/icon.svg?rev=1115231)
 * [Related Posts by Taxonomy](https://wordpress.org/plugins/related-posts-by-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-by-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-by-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-by-taxonomy/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/blank-output/#post-6692392)
 * Status: resolved