Okay
  Public Ticket #278734
Recent Comments in TOP 10 slider
Closed

Comments

  • Pedro started the conversation

    Hi. The tittle is sefl-explanatory: I wanted to show recent comments e the TOP 10 slider instead of the information that is displayed now (the top views, top comments, etc). How can I do this?

    Thanks.

  •  327
    Brian replied

    This would require manual modifications to the theme code. That specific area is located in inc/top-ten.php and the specific line of code that calls that loop is on line 277 and looks like this:

    <?php $loop = it_loop($args, $format, $topten_timeperiod); echo $loop['content']; ?>
  • Pedro replied

    I'm an amateur self-taught in php and css.

    So, should I replace...

    $args, $format, $topten_timeperiod

    ...with someting like this?

    $no_comments = 5, $comment_len = 80, $avatar_size = 48

    Don't I need a funtion to call the recent comments?

    And in other matter, where do I enable the random post button. It's just an icon on my website. I can't find any option to activate it. But I've seen the same theme in other sites where it's funtional, it displays a random post by clicking on it. and I figure that was the point when you decided to post it on the theme. :)

  •  327
    Brian replied

    I'm not sure specifically what the code would be - you'd need to check with WordPress support (check the Codex too).

    You need to turn on the random button - it's in the theme options, just turn it on and it will work as intended. If you try to turn it on and still don't see it on your front end, let me know what your URL is so I can take a look. The random button has been in the theme since the first version.

  • Pedro replied

    I get how the random button works. I just can't find the option in them options. 

    The only option I find related to it is this and I don't have it selected: Disable Random Article Button

    That's why it shows on site but has no funtion, it's just an icon.

    Here's the website: http://tvdependente.net/

  •  327
    Brian replied

    Oh I see - the issue is a z-index (layer) issue. Add this to your Custom CSS theme option:

    #main-menu-wrapper #random-article{z-index:999}
  • Pedro replied

    Done. Thank you so much.

    Now, since you can't help with the comments, how about fixing this error?

    PHP Warning: Invalid argument supplied for foreach() in /home/tvdepend/public_html/wp-content/themes/flavor/inc/post-loop.php on line 120

    The line in question is:

    foreach($directory_minisites as $dm) {

  •  327
    Brian replied

    The issue is that you need to adjust your minisite directory settings for that page. Go into the minisite directory options and make sure you have selected some minisites to display and also make sure you select the number of posts per page to display.

  • Pedro replied

    Sorry, I'm not understanding.

    I have three minisites and all have the options "Enabled" and "Included" selected since I've created them.

    I don't want the minisites to show separately. I want all the information in the homepage loop.

    If I give you a login information, can you take a look to see what I'm doing wrong?

  •  327
    Brian replied

    If you aren't using minisite directories then you should not be applying the Directory page template to any of your pages. The error above can only happen on a minisite directory page. Perhaps you have mistakenly assigned the Directory template to your minisite pages?

  • Pedro replied

    I'm goin to try to explain better what I meant: my website is specific for one area, television shows. But I decided to create three minisites for different types of reviews (episodes, season overall and pilots). I have three minisites, so I believe those are three different directories, because they have individual slugs and, in the wordpress backoffice, the articles created are placed in seperated screens. But on the site, on the homepage, I decided I didn't want those three minisites appearing in different forms, I wanted them to appear as if they were all the same (no other colors, no new logo, nothing), because I want people to think they are always in the same site, even tough they are in a specific minisite. So I have all posts, of all minisites, displaying in the loop.

  •  327
    Brian replied

    I still don't think you understand what I'm saying. I'm talking about the Template in the Page Attributes section. Do not select Minisite Directory for any of your pages - even if you are using minisites(which you are). See attached screenshot.

  • Pedro replied

    You're right. I wasn't understanding.

    I only have 2 pages, one marked as Default and the other Author Listing. I had some drafted pages, and altough they were all marked as default, I removed them.

    I'm going to see if that fixes the problem. 

    Thanks for the help, and sorry for the confusion.

    Best regards.

  •  327
    Brian replied

    You're welcome.