Title: Zemanta
Last modified: August 21, 2016

---

# Zemanta

 *  [mertcancam](https://wordpress.org/support/users/mertcancam/)
 * (@mertcancam)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/zemanta-1/)
 * Hi,
 * I installed Zemanta related post plugin today and it is just the on that i looked
   for. The problem is that it only works when I am logged in to wordpress as an
   admin. When I logged out, all related posts disappears from the posts. What would
   cause that issue? what would be the solution?
 * Thanks,
    Jimmy Thoj

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

 *  [jessy](https://wordpress.org/support/users/jessy-marco/)
 * (@jessy-marco)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/zemanta-1/#post-4493698)
 * II options:
 * 1, Contact [http://www.zemanta.com](http://www.zemanta.com/)
    2, Into `functions.
   php` write this snippets from [http://wpsnipp.com](http://wpsnipp.com/index.php/functions-php/display-related-posts-by-posts-current-author/)
 * Into the function.php:
 *     ```
       function get_related_author_posts() {
           global $authordata, $post;
           $authors_posts = get_posts( array( 'author' => $authordata->ID, 'post__not_in' => array( $post->ID ), 'posts_per_page' => 5 ) );
           $output = '<ul>';
           foreach ( $authors_posts as $authors_post ) {
               $output .= '<li><a href="' . get_permalink( $authors_post->ID ) . '">' . apply_filters( 'the_title', $authors_post->post_title, $authors_post->ID ) . '</a></li>';
           }
           $output .= '</ul>';
           return $output;
       }
       ```
   
 * Into the single.php (single page) this tag:
 * `<?php echo get_related_author_posts(); ?>`
 *  [Mateja](https://wordpress.org/support/users/sparkica/)
 * (@sparkica)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/zemanta-1/#post-4493704)
 * Hey,
 * Zemanta’s plugin should work even if you’re not logged in as an admin. Which 
   version of the plugin are you using? Also, can you please provide URL of your
   blog so we can check what’s going on?
 * Best,
    Mateja
 *  [jessy](https://wordpress.org/support/users/jessy-marco/)
 * (@jessy-marco)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/zemanta-1/#post-4493766)
 * 1, This snippets works fine for non-logged users too.
    2, I do not use any plugin
   for this simple feature, because it slow down the website. Snippets are great.
   3, Example of the code [Beers Pubs](http://beerspubs.online-influencer.com/a-trip-with-jordan-to-canadas-national-archives/)
   4, Related posts are the best to create from tags of the post or categories, 
   that is php logic of the function. 5, Markup based on Bootstrap 2.3.2
 * Related posts by tags:
 *     ```
       <?php
       // $current_post = $post;
   
       //Call global variable posts
       global $post;
   
       //Save to variable all tags from the post ID
       $posttags = wp_get_post_tags($post->ID);
   
       //If the post has a tags
       if ($posttags) {
   
       //set up tags_ids as arrays
       $tags_ids = array();
   
       //loop through post tags from the current post and set array tags_ids save it from object posttags
       foreach($posttags as $posttag) $tags_ids[] = $posttag->term_id;
   
       //set arguments as array for the object wp_query
       $args = array(
           'tag__in' => $tags_ids,
           'post__not_in' => array($post->ID),
           'posts_per_page'=> 4, // Number of related posts that will be shown.
           'ignore_sticky_posts'=>1
       );
   
       //Set the new object and asign there an array of the arguments
       $relatedposts = new wp_query( $args );
   
       //loop
       if( $relatedposts->have_posts() ) {
           echo '<div class="related-posts clearfix"><h4>Related Posts</h4><div class="row-fluid">';
   
       while( $relatedposts->have_posts() ) { $relatedposts->the_post(); ?>
   
       <div class="span3">
       <a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail('relatedpost-image'); ?></a>
       <span><a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
       </div>
   
       <? }
   
       echo '</div></div>';
   
       } //end of the post
       } //end of if the post has tags
       // $post = $current_post;
       wp_reset_query();
       ?>
       ```
   
 *  Thread Starter [mertcancam](https://wordpress.org/support/users/mertcancam/)
 * (@mertcancam)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/zemanta-1/#post-4493795)
 * Here is my website;
 * [http://www.jellypeep.com](http://www.jellypeep.com)
 * Thank you all for your responses. I have deleted Hyper cache and problem is solved.
   I have another question though. I have intalled w3 total cache after deleting
   hyper cache. Now when I click a category, a blank page appears. I could solve
   that so I had to delete the plugin.
 * Best Regard,
    Jimmy Thoj

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

The topic ‘Zemanta’ is closed to new replies.

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [dashboard](https://wordpress.org/support/topic-tag/dashboard/)
 * [only](https://wordpress.org/support/topic-tag/only/)
 * [work](https://wordpress.org/support/topic-tag/work/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [mertcancam](https://wordpress.org/support/users/mertcancam/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/zemanta-1/#post-4493795)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
