WP Framework Forums

A blank WordPress Theme Framework

Register or log in - lost password?

WP Framework Forums » Troubleshooting

Leave a comment link doesn't go to comments

(3 posts) (2 voices)
  • Started 1 year ago by llepere
  • Latest reply from llepere
  • This topic is resolved
  • 2 Members Subscribed To Topic
  • Related Topics:
    1. tab navigation in comments
    2. Threaded comments
    3. highlights author's comments?
    4. Comments: Odd/Even & Numbered
    5. Comments & Tweetbacks & Pings

Tags:

  • abercrombie and fitch clothing
  • abercrombie london
  • authentic nfl jerseys
  • cheap nfl jerseys
  • colts jerseys
  • comments
  • fake transcripts
  • hollister clothing
  • patched
  • saints jerseys
  • ticket
  • Wholesale nfl jerseys
  1. llepere
    Member

    I'm not sure if this is a framework issue or a Wordpress issue. But the Leave a comment links don't go to the comments on the single post page, it just goes to the top of the post.

    The code in index.php is:
    <a href=<?php comments_link(); ?>>

    What shows up in the page that's delivered is:
    <a href=http://mysite.com/.../post_title#comments>

    There was no anchor in the post that had
    name=comments.

    I added one in comments.php just after:
    <?php if ( comments_open() ) : // show comment form ?>

    Now it works. But looking at the Wordpress documentation about threaded comments I'm not sure if doing this is going to cause some other problem.

    Posted 1 year ago #
  2. Ptah Dunbar
    Framework Overlord

    Leave a comment link doesn't go to comments fixed. props to llepere

    This bug is fixed in the latest trunk. What I did was move the if block from above the #comments div to within:

    <!--BEGIN #comments-->
    <div id="comments">
    <?php if ( have_comments() ) : // If comments exist for this entry, continue ?>

    ...

    <?php endif; // ( have_comments() ) ?>
    <!--END #comments-->
    </div>

    That way regardless whether the post has comments or not, the leave a comment link will work.

    Posted 1 year ago #
  3. llepere
    Member

    Thanks! I really appreciate your quick responses.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

WP Framework Forums is proudly powered by bbPress.