Comments not showing up in footer widget

(14 posts) (2 voices)

  1. zaidaboobaker
    Member

    Hi

    Using infocus2.0 and having an issue that recent comments are not showing up in my footer widget. I have even tried 3rd party recent comment plugins and still no luck. Any ideas?

    Posted 9 months ago #
  2. Elliott
    Support

    Hello zaidaboobaker,

    Go ahead and deactivate all plugins and then send us a link to your site. The Wordpress comments plugin is not showing up either?

    Make sure that you actually have some posts with comments in them and that the posts are not hidden.

    Also make sure that you are placing the widgets in the correct footer area. To make sure it is not an issue then place them in footer area 1.

    Posted 9 months ago #
  3. zaidaboobaker
    Member

    Hi Elliot

    So I've disabled the plugins and found that its the plugins that execute php within widgets are the ones that when enabled they make the comments not show up in the footer.Not sure why this is, as it works fine on other sites.
    Even wierder is that currently, if the plugin is activated the comments work, but the minute I use it, then it causes comments to break.
    Check page http://www.bosmontmasjid.co.za/services/donate/

    Can you guys help?

    Posted 9 months ago #
  4. Elliott
    Support

    Go ahead and send us a link to the plugin and we'll take a look on our end.

    Posted 9 months ago #
  5. zaidaboobaker
    Member

    Here they are:

    wordpress.org/extend/plugins/exec-php/ and
    wordpress.org/extend/plugins/php-code-widget/

    both, when enabled create the error. It does this whether I use the native recent comment widget from wordpress, or any other 3rd part recent comment widgets.

    thnks for the great support

    Posted 9 months ago #
  6. Elliott
    Support

    If it gives you an error when using the native Wordpress comments then it sounds like the plugin is imcomplete or needs to be udpated. Try getting in contact with the plugin authors and let them know about this.

    Your trying to run PHP code inside a widget correct? Let us know exactly what your trying to do and we may be able to give you some suggestions.

    Posted 9 months ago #
  7. zaidaboobaker
    Member

    I am trying to run php code in a widget. The plugins i referenced above allow for this. It works fine, except that for some reason, when enabled, the recent comments dont show in the footer. It just shows the heading with a blank below it. When i disable the plugin, then the comments work.

    I am using the same plugin, with the same php code and recent comments in the footer with the Suffusion theme. This works without any problems. So im guessing that it cant be the plugin or the code. It may be some clash with the theme?

    here is the code

    <?php
     echo " The Salaah begins 15mins after the Adhan"."\n";
    date_default_timezone_set('SAST');
    $conn = mysql_connect('localhost', 'bosmojpv_admin', 'qwerty@786');
    if (!$conn) {
       die('Could not connect: ' . mysql_error());
    }
    mysql_select_db('bosmojpv_ptimes');
    $result = mysql_query('select name,alias from aliases');
    if (!$result) {
       die('Query failed: ' . mysql_error());
    }
    while($row=mysql_fetch_assoc($result)){
      $person[] = $row['name'];
      $alias[] = $row['alias'];
    }
    $i = 0;
    foreach ($person as $a){
      if($i == 0){
         $fieldnames .= $a;
      } else {
         $fieldnames .= ','.$a;
      }
      $i++;
    }
    $dtstr = date("d-M");
    echo ' <table class="fancy_table" width="150">'."\n";
     
    $result = mysql_query('select '.$fieldnames.' from salaah where date = "'.$dtstr.'"');
    if (!$result) {
       die('Query failed: ' . mysql_error());
    }
    while($row=mysql_fetch_array($result)){
      for ( $counter = 0; $counter < $i; $counter++) {
         echo '  <tr>'."\n";
         echo '    <td>'.$alias[$counter].'</td>'."\n";
         echo '    <td><div align="center">'.$row[$counter].'</div></td>'."\n";
         echo '  </tr>'."\n";
      }
    }
    echo '</table>'."\n";
    mysql_free_result($result);
    ?>

    Hope you guys can help with this one. With regards your suggestion to contact the plugin developers. I have tried this with 2 different plugins with the same result.

    Posted 9 months ago #
  8. zaidaboobaker
    Member

    forgot to mention that if you look at this page http://www.bosmontmasjid.co.za/services/donate/, you will see the php code being executed fine, but the comments not showing up in the footer, and when you look at this page: http://www.bosmontmasjid.co.za/ , I have had to remove the php code in order to get the comments to show up.

    Posted 9 months ago #
  9. Elliott
    Support

    Is it just the recent comments widget or is it any widget that does not display? I'm not that fluent in MySQL but I think you need to close your connection after your done with it, http://php.net/manual/en/function.mysql-close.php.

    Posted 9 months ago #
  10. zaidaboobaker
    Member

    Hi Elliot

    @MYSQL neither am i :) but thanks I will check it out.

    The other widgets work fine. It is just the recent comments that dont show up.(Both the standard WP recent comments widget and any third party ones.

    Posted 9 months ago #
  11. zaidaboobaker
    Member

    Hi Guys

    If we cant resolve, can you tell me if there is a way to show a comments page where people can read the latest comments. I can then remove the comments widget and create a button linked to the page or sumthing.

    Posted 9 months ago #
  12. Elliott
    Support

    We do have a comments shortcode which basically acts just like the wordpress default widget, http://mysitemyway.com/docs/index.php?title=Widget_Shortcodes#Comments.

    Posted 9 months ago #
  13. zaidaboobaker
    Member

    Hi Elliot

    Thanks that worked nicely.Just one thing though, is there a way to show the comment excerpt, instead of just the commenter and the post that the comment was for.

    Posted 9 months ago #
  14. Elliott
    Support

    What that does is use the Wordpress recent comments. I'll move this to feature requests and we'll take a look at making a more functional comments widget with gravatars, etc etc.

    I also found this, http://wordpress.org/extend/plugins/get-recent-comments/, which you might be interested in.

    Posted 9 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme