Forums

[resolved] commenting without a post? (16 posts)

  1. deadceasar
    Member
    Posted 4 years ago #

    ok, i've read through many entries with the same problem (almost) and can't say that mine directly relates. i've built a gallery of artwork on my blog and would like to add the comments template to get feedback, but submitting a comment takes you to that dreaded blank comments-post.php page. comments work perfectly well on any other page that has actual posts, so my question is: can you comment without a post?

  2. moshu
    Member
    Posted 4 years ago #

    can you comment without a post?
    Not really.

  3. Michael Fields
    Theme Wrangler
    Posted 4 years ago #

    deadceasar,

    Hi. My blog is set up the same way as yours and I have the comments working for attachments. I did this by adding <?php comments_template(); ?> to my theme's 'attachment.php' template file. Most theme's actually do not come with this file, but I would say that it is a necessary part of any blog who uses the image uploading capability of WordPress.

    The reason that this works is that (in the wordpress database) posts, pages and attachments are all stored in the same table. I believe that you can add comments to all of them.

    Check it out here: mfields.org

  4. deadceasar
    Member
    Posted 4 years ago #

    come on, moshu! there's got to be a way. do you suppose that scripting a different template php would work? not that i would be able to do such a task with my current understanding of the language.

  5. deadceasar
    Member
    Posted 4 years ago #

    mfields,

    i'll look into the attachment method. i noticed previous themes that i've used had that file, but i've customized my current theme from top to bottom and no longer have it. thanks for the reply!

    nice imagination you have there!

  6. deadceasar
    Member
    Posted 4 years ago #

    ummm, unless i'm misunderstanding the attachment.php, this is solely for inserting images from the Write admin panel. no? My gallery isn't set up that way. All images are hard-coded with -a hrefs- (and some serious hover and span action also).

    click on a panel and check out the source:
    http://mcgrewsmusings.com/?page_id=180

    sorry if i'm just ignorant.

  7. moshu
    Member
    Posted 4 years ago #

    ?page_id=180

    That means that is Page. Pages also can be commented - just have the call for the comments template.

  8. deadceasar
    Member
    Posted 4 years ago #

    moshu,

    i did that and it led me to this investigation. i thought i had previously made it known this was a page and not a post. sorry for the confusion. anyway, i temporarily put the call back into this page so you can maybe better understand. who knows, maybe it will work for you, but it sure a hell ain't workin' for me.

    http://mcgrewsmusings.com/?page_id=190

    edit-- i'm assuming all i need is the single call for the template, yes?

  9. moshu
    Member
    Posted 4 years ago #

    You call it in the wrong place.
    It has to be done in the Loop. Look at other themes where it is.

  10. deadceasar
    Member
    Posted 4 years ago #

    sorry moshu, that doesn't help me much. reading up on The Loop speaks only about calling posts, which i don't have any. could you possibly point out where my 'Loop' is in the page provided?

    what you said was the wrong place is exactly where i put it in my single post.php (which works). i just don't get it, man.

  11. moshu
    Member
    Posted 4 years ago #

    Paste your Page template file to http://wordpress.pastebin.ca and post back with the url.

  12. deadceasar
    Member
    Posted 4 years ago #

    link's busted. i can't get in. i'll have to work up a new page template to get the code to you, unless you have an alternate route.

  13. deadceasar
    Member
    Posted 4 years ago #

    nevermind. this is more trouble than it's worth.

  14. Kafkaesqui
    Moderator
    Posted 4 years ago #

    Wow, you give up easy.

    Try posting the source of your template here:

    http://wordpress.pastebin.com/

    or if that is down too:

    http://paste.uni.cc/

    (Note to watchers: we really need our own pastebin...)

  15. deadceasar
    Member
    Posted 4 years ago #

    it's not that i'm giving up, but rather it's getting late here and i have an early start in the morning. anyway, here are the links you'll need.

    thanks for all your help, by the way.

    Misc gallery.php
    http://paste.uni.cc/17960

    Single Post.php
    http://paste.uni.cc/17961

    Blog
    http://mcgrewsmusings.com/

    --edit-- scratch that, i forgot i took the template out of the gallery. here's the revision:
    http://paste.uni.cc/17962

  16. deadceasar
    Member
    Posted 4 years ago #

    fyi, i went back over the Loop business and understand it much more now. all i needed in my page was the essential parts (the if an the while); deleting everything else (post title, date, content, tags, etc).

    thanks for the spotlight, moshu.
    and the links, k-man.

Topic Closed

This topic has been closed to new replies.

About this Topic