Ready to get started?Download WordPress


[resolved] wp_list_comments not listing comments (2 posts)

  1. christopherharte
    Posted 5 years ago #

    Hey everyone, i dont like taking away from other peoples issues, but ive been working on a custom hacked theme and have just recently hit a road block.

    For the single.php i am using the wp_list_comments() function to grab all the comments for the displayed post, and on this page it seems to work fine and problem free. However, I have designed a pseudo member/profile page with the assistance of some of wordpresse's fine plugins and this page has a post which emulates a profile wall using the wordpress comment system. The issue, is that wp_list_comments is not functioning at all on this page.

    A little more up the page prior to using wp_list_comments(), i am also using a query_posts() selector as well as a $wpdb select query to run a few tests on the page, namely the user info, if a post exists and if it doesnt: make it, that sort of thing.

    Oh, i should note that the page where I am having the issue is a page template, perhaps that is the issue? Maybe within the template of the page one cannot execute wp_list_comments on a post successfully because we are technically already inside a post/page? If this is the case, does anyone know any creative way around this?

    Any ideas as to where to start looking for a solution would be greatly appreciated. :)

    Thank you

  2. christopherharte
    Posted 5 years ago #

    HAH! Im guessing it was a scope issue, and im too preoccupied to find out exactly what was causing the problem though i will look into it once i figure out what im doing :| i know this is a hackish solution, but it seems to work, and that is to just copy the function from its native file and apply it directly to the page that was having the issue. At least this keeps things consistent and reduces my evening workload, allowing me to focus on the good stuff ;)


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.