• Resolved psimatrix

    (@psimatrix)


    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://www.ads-software.com/plugins/related-posts-by-taxonomy/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blank Output’ is closed to new replies.