Forums

[resolved] comments not posting (7 posts)

  1. charlesferrer
    Member
    Posted 1 year ago #

    Hi I am new to wordpress and still getting to grips with working with .php. I am having trouble trying to include the comments from a "comments.php" into my "page.php". I tried to use

    <?php include (TEMPLATEPATH . "/comments.php"); ?>

    but it just showed the comment box allowing users to post a comment but does not reveal the comments users have posted.

    If someone could give me some help as I am still new to wordpress that would be great.

    Many thanks
    Charles.

  2. flamenco
    Member
    Posted 1 year ago #

    Your PHP may be fine. If you're hoping that this code will display comments from other parts of your site, it won't. It will, I believe, only display ones made on that page. To test, put in a comment yourself, refresh, and see if it shows up.

    If you're looking for something to display all comments or a sampling, your best bet is to investigate widget processing, which is generally easier to get into a sidebar with most themes, though you could do theme surgery to get that elsewhere. As a WP and PHP beginner, I don't know if I'd recommend that.

  3. charlesferrer
    Member
    Posted 1 year ago #

    Hi Falmenco,
    Thanks for you advice I have tried putting in a comment myself and seeing if it does show up but once I click on the submit comment button it looks like it just refreshes the page and does not post up the comment I have inputted.

    To give you an idea of what the layout I am trying to create here is a link from a website http://www.spifftv.com/video.php?id=3801, as you'll notice the video is at the top and the comments are posted at the bottom of it, sorry if the video is not your type of genre its the only website I know of that has the layout I am aiming to create.

    Many thanks
    Charles.

  4. flamenco
    Member
    Posted 1 year ago #

    Hi Charles,
    Looking a bit deeper, I actually did this in one of my site themes, as many do not provide for commenting on pages.

    This should hook you up if you're using the current version of WP, try it instead of your include.

    http://codex.wordpress.org/Function_Reference/comments_template

  5. charlesferrer
    Member
    Posted 1 year ago #

    Hi flamenco,
    I tried your suggestion and it actually works, I dont know how I can thank you enough your a triple star.

    Thanks allot
    Charles.

  6. flamenco
    Member
    Posted 1 year ago #

    Glad to hear it, Charles! Take care, and you can mark this resolved if you'd like.

    Dave

  7. charlesferrer
    Member
    Posted 1 year ago #

    Thanks Dave,
    will mark it as resolved now

    Charles.

Topic Closed

This topic has been closed to new replies.

About this Topic