WordPress.org

Ready to get started?Download WordPress

Forums

Tiny Forge
[resolved] comment link at bottom of post (12 posts)

  1. melwp
    Member
    Posted 3 months ago #

    When reading posts on the home page, I see that there is a comment count at the top of a post (if there are comments). However, I want my readers to be able to click a link at the end of the post to leave a comment without having to scroll back to the top. Can you tell me how to do this? I'm using the disqus comment system.

    Thanks for this theme!

  2. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    To make a comment they don't have to scroll to the top, they only have to scroll a bit to the bottom, where the comment form is located ;)

    Unless you put a bunch of additional content there... a live example would be a good way to understand what is the problem.

  3. melwp
    Member
    Posted 3 months ago #

    Sorry, I guess I'm not making myself clear. The comment form isn't shown unless the individual post is opened. However, to open the post, you have to scroll all the way back to the top. So, is there a way to add a "leave a comment" link at the end of a post to provide an easy way to access the individual post and comment form?

  4. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    Ok, so I just guess that you use older version of the theme, because in newer ones, that link next to the post title "leave a comment" is hidden if there are no comments. So you see, if there are no comments even scrolling to the top would not help :)

    I would suggest to not encourage readers read articles on the index wall or category listing. In the edit screen of the post you could place your cursor where you want to cut the post and click MORE button. This way your index page would not be overloaded with long content and users would read articles where they should do this. Plus in the individual post view font is larger, so it is easier to read.

    Would you like to try it?

    See my site: mtomas.com for an example.

  5. melwp
    Member
    Posted 3 months ago #

    I don't have a "leave a comment" link at the top. It only shows comment count after a comment is there.

    I understand the option of adding a "read more" link to cut the article short. However, just based on personal preference, I don't like when blogs make me click to read more. Is there a simple way to access the comment form from the end of a post?

  6. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    You would have to edit function tinyforge_entry_meta located in functions.php and insert there something like:

    <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'tinyforge' ) . '</span>', __( '1 Comment', 'tinyforge' ), __( '% Comments', 'tinyforge' ) ); ?>

    This way comments count would be in the same area with cats, tags, etc. I'm not sure if it is an easy way though... probably not.

  7. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    Or maybe easier would be to edit content.php file and insert:

    <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
    					<span class="meta-separator">•</span> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'tinyforge' ) . '</span>', __( '1 Comment', 'tinyforge' ), __( '% Comments', 'tinyforge' ) ); ?>
    				<?php endif; // have comments ?>

    In the <footer class="entry-meta"> right after <?php tinyforge_entry_meta(); ?>

  8. melwp
    Member
    Posted 3 months ago #

    Awesome! It worked. Thank you for the very specific instructions.

    One last question... When an individual post is open, and has no comments, it says "leave a reply" at the top of a post, but when clicked, the link doesn't take you to the bottom. Any ideas? It doesn't show up on the home page, only when the individual post is opened.

  9. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    Perhaps article is very short? Then it scrolls only until page end. On my site it works as intended.

  10. melwp
    Member
    Posted 3 months ago #

    No, it doesn't scroll down at all (the article was quite long). Maybe it's just not working together with disqus. The link there is http://www.mysite.com/?p=48#respond whereas the other comment links go to http://www.mysite.com/?p=48#disqus_thread

  11. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    So that's the issue with the plugin. You have to ask developer of that plugin how you should alter code I provided, so it would point to comments.

  12. melwp
    Member
    Posted 3 months ago #

    Ok, thanks again for your help.

Reply

You must log in to post.

About this Theme

About this Topic