• 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)
  • Thread Starter ettanbazil

    (@ettanbazil)

    Can someone please try and help?

    [moderator note: please do not bump; and only start one topic per problem]

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you use a commercial theme or plugin and need support, please go to their official support channel. In order to be good stewards of the WordPress community, and encourage innovation and progress, we feel it’s important to direct people to those official locations. Doing this will provide the developer with the income they need to make WordPress awesome.

    Forum volunteers are also not given access to commercial products, so they would not know why your commercial theme or plugin is not working properly. This is one other reason why volunteers forward you to the commercial product’s vendors. The vendors are responsible for supporting their commercial product.

    Your theme’s support is here: http://cosmothemes.com/support/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Users hogging my blog’ is closed to new replies.