All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

Author Topic: Any way to use wp-commentnavi BEFORE the comments loop?  (Read 3492 times)

0 Members and 1 Guest are viewing this topic.

Offline mikedesign

  • Newbie
  • *
  • Posts: 5
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: default
I would like to display the pagination for the comments at the top of the page - so I need to place the code BEFORE the comments loop. Is there any way to do that?

Thanks a lot in advance!
Mike

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #1 on: 09 January 2011, 07:06 »
It should work before or after the comment loop.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline mikedesign

  • Newbie
  • *
  • Posts: 5
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: default
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #2 on: 18 January 2011, 02:33 »
Really? When I put it before the loop:

<ol class="commentlist">
   <?php wp_list_comments(); ?>
</ol>

Then it doesn't show up but if i put it further below - then it does. I would like to display the navigation on top of the comments - any ideas?

Note: I'm running WordPress 3.0.4.

Thanks so much!! Very appreciated.
Mike.

Offline mikedesign

  • Newbie
  • *
  • Posts: 5
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: default
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #3 on: 21 January 2011, 22:31 »
Anyone?

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,296
    • View Profile
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #4 on: 22 January 2011, 23:30 »
Could your theme have a css element that is being hidden?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline mikedesign

  • Newbie
  • *
  • Posts: 5
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: default
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #5 on: 23 January 2011, 17:42 »
No. Here's a very simple test:

<?php if ( have_comments() ) : ?>
   <h3 id="comments"><?php comments_number('No Comments', 'One Comment', '% Comments' );?></h3>

   <div class="navigation">
      <div class="alignleft"><?php previous_comments_link() ?></div>
      <?php if(function_exists('wp_commentnavi')) { wp_commentnavi(); } ?>
      <div class="alignright"><?php next_comments_link() ?></div>
   </div><br class="clear">

   <ol class="commentlist">
   <?php wp_list_comments(); ?>
   </ol>

   <div class="navigation">
      <div class="alignleft"><?php previous_comments_link() ?></div>
      <?php if(function_exists('wp_commentnavi')) { wp_commentnavi(); } ?>
      <div class="alignright"><?php next_comments_link() ?></div>
   </div>

So the pagination should appear in 2 places - above the comments and below. In each place it should be positioned between the "older comments" and "newer comments" default WordPress links. BUT the pagination only appears AFTER the comment loops and NOT before (but the "older comments" and "newer comments" link appear in both places).

Any help would be greatly appreciated. Thanks!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #6 on: 24 January 2011, 00:29 »
My bad, after some digging, I think it is not possible as before the wp_list_comment() function is called, none of the comment variables used for paging are being populated.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline mikedesign

  • Newbie
  • *
  • Posts: 5
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: default
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #7 on: 24 January 2011, 21:15 »
Thanks for replying! Do you know anyway around this? Or does anyone else in this forum know a way to display pagination before the comment loop?

Much appreciated! Thanks,
Mike.

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Any way to use wp-commentnavi BEFORE the comments loop?
« Reply #8 on: 25 January 2011, 00:35 »
I don't have any workaround for this at the moment that does it efficiently.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.