Users hogging my blog
-
http://www.onlinemusicawards.org/
So at the moment, the front page shows new user posts(fresh) and featured user posts(hot). A post becomes featured when people keep liking it.
The site accepts front end posts which is all working fine. The problem I am having is people are trying to hog the featured posts section on the front page. I want to limit the featured posts to 1 post per user. The code I have so far in main.php is:
<?php if( options::get_value( 'front_page' , 'type' ) == 'hot_posts' ){ if( options::logic( 'general' , 'enb_likes' ) ){ $blogusers = the_last_post_per_user; if ($blogusers) { foreach ($blogusers as $bloguser) { $args = array( 'author' => $bloguser->post_author, 'showposts' => 1, 'caller_get_posts' => 1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { ?> <li class="menu-item hot <?php echo $hclasses; ?>" ><a href="<?php echo $hot_url; ?>" ><?php echo options::get_value( 'menu' , 'featured' ); ?><span><?php echo options::get_value( 'menu' , 'featured_' ); ?></span></a></li> <?php } ?> <li class="menu-item new <?php echo $nclasses; ?>"><a href="<?php echo $news_url; ?>" ><?php echo options::get_value( 'menu' , 'fresh' ); ?><span><?php echo options::get_value( 'menu' , 'fresh_' ); ?></span></a></li> <?php } } } ?>
It doesn’t seem to be having any effect whatsoever. Can anyone tell me where I’m going wrong?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Users hogging my blog’ is closed to new replies.