Thread Starter
vagari
(@vagari)
OK, so since I’m trying to get this to work on an individual page according to the documentation it won’t work, “even when within The Loop.”
http://codex.ww.wp.xz.cn/Template_Tags/comments_popup_link
Makes sense if this is THE loop for the page. But this is an alternate “loop.” Anyone have any idea how to get around this? Or an alternative for multiple loops that would provide me with what I need and still allow this stuff?
Here’s the basics of the layout… I’ll try my best in unformatted text.
Recent Posts
Title of article one.
April 12th, 2007 · No Comments
Title of Article two.
April 5th, 2007 · 3 Comments
Title of Article three.
April 1st, 2007 · 1 Comment
It’s nothing fancy. Thanks again everyone.
Thread Starter
vagari
(@vagari)
I’d be interested in other solutions to this problem. But a workaround I’ve found is to use comments_number() (which isn’t exactly the same statistic) and manually create the URL.
<a href="<?php comments_link(); ?> "><?php comments_number('No responses','One response','% responses'); ?></a>
(@vagari)
19 years, 1 month ago
I have a multiple loop on the front page that works fine for spitting out a few “recent posts.” But I need to same thing in a “sidebar” on some internal pages. The original code does not work because of whatever bug is breaking the multiple loops. is_page() stops working correctly.
http://codex.ww.wp.xz.cn/The_Loop#Multiple_Loops_Example_2
Here’s that code.
Since it used to work I really wish it wasn’t broken. Nice and simple. But I figured I’d comment it out and try another version. This one worked, for the most part, no breaking of “is_page” and stuff like that. But NOW I can’t get comments_popup_link to work.
It’s basically the same code with just the different method for grabbing the query. Does anyone know why the comments_popup_link() doesn’t work anymore? the_title() and the_permalink() work fine. And I really need to get this fixed. I’m almost done with the site and I’m running out of unrelated things to do.
Thanks everyone!