How to add a “Comment” button
-
Hi Aixa.
Yes, this depends of the theme you’re using. You’ll need to add some
commentfunctions insidethe_loop.You’ll probably looking for
comments_popup_link.
http://codex.ww.wp.xz.cn/Template_Tags/comments_popup_linkThank you so much for your quick response, yes that’s exactly what I was looking for!
But I’ve been trying and seems like I can’t manage to place the code correctly..
I thought it should be inhome.php(sinceindex.phpis empty) somewhere between<!-- News Articles -->and<!-- #index-news --><!-- News Articles --> <div id="index-news"> <div class="home-title"><?php echo arras_get_option('news_title') ?></div> <?php $news_query_args = array( 'cat' => arras_get_option('news_cat'), 'paged' => $paged, 'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) ) ); query_posts($news_query_args); arras_render_posts(null, arras_get_option('news_display'), 'news'); ?> <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?> <div class="navigation clearfix"> <div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div> <div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div> </div> <?php } ?> </div><!-- #index-news -->But either if I put it above or below the first script, the link doesn’t appear inside the post but above or below all the posts, all the links together.. I can’t find the way to put it inside the posts..
<small>I just noticed I forgot to link to my page by the way</small>
arras_render_postsis probably a built-in function of the theme that list the posts you want to put the comment link on. That’s even harder to see how the theme works like this.Look where this function is declared, something like
function arras_render_posts, so you can find wherethe_loop[1] is around there.Hope it helps. =D
Oh I see, well I’ll look for it until I find it!
Thank you again! 🙂
The topic ‘How to add a “Comment” button’ is closed to new replies.
(@aixa)
16 years, 1 month ago
Hi, I’m kind of new to WordPress and I’d like to know if there’s actually a way to put a “Comment” button/link in each post on the front page, since the comment box only appears when you are watching the single post.
I don’t know if it depends on the Theme, I’m using Arras, just in case..
Well, here you have the link to my blog, I’d like to have the button on the “New Posts”
Thanks in advance! (And I apologize for my bad english)