WordPress.org

Ready to get started?Download WordPress

Forums

How to have comment feature NOT associated with a (7 posts)

  1. jcairns
    Member
    Posted 10 years ago #

    I'd like to have a Feedback page which is simply a Comment page with a post entry, except I don't want the post entry appearing in my main page; this is, I have my regular blog posts on my main page, and included in my menu is a Feedback link, which takes the users to a new page where they can enter comments that relate to feedback about the site.
    Make sense? Can anyone point me in the right direction?
    Thanks,
    jody

  2. jcairns
    Member
    Posted 10 years ago #

    Yeah, that's what I want: a guestbook. Is there a hack for WordPress to implement that, or can someone let me know where to find code for it? Nothing complicated; it's essentially a comment page, but the post associated with it doesn't show up as a post; it's a standalone post on its own page.

  3. davidchait
    Member
    Posted 10 years ago #

    If you don't want it associated with any given post, why don't you make an (otherwise unshown, various methods) post called "Feedback", route people to it, and then let people use the standard comments system in that 'post'?
    Or are you looking for a 'contact form'?
    -d
    http://www.chait.net

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    Yes, that's what I want except I was wondering if anyone has easily implemented this type of this. Ziggamon asked a similar question, but he figured it out on his own. He explained a bit how he implemented that page to me, so it appears I'll being doing some hacking myself.
    If anyone has a documented hack for this already, I'd appreciate some guidance.
    Thanks.

  5. davidchait
    Member
    Posted 10 years ago #

    Here's a way to do it just in index.php, without modifying the core code or db or anything. though this might seem hacky, it's rather simple. it will slightly throw off posts-per-page counts and won't be completely hidden from other sections, but bear with me.
    - make a category called 'feedback'. This way, the post will be isolated away, and still people will find your feedback page immediately...
    - make your 'feedback post'. make a note of what post number it is. make sure it is in the feedback category.
    - set a variable at the top of index.php called something like $feedbackPostID. set it = to the post number.
    - inside the $posts loop, the very first thing you should do is:
    if (empty($p) && $post->ID == $feedbackPostID) continue;
    That should be it. You can now link to the post directly, list_cats will include the (singular) post in its list, and people can click on it to get to the commentable area, and in theory you could expand this to other posts.
    Now, the 'right' way to do this, and not screw up page counts, etc., would be to have some kind of new post field called post_hidden (or something), and add a rule to the main query (or queries more appropriately) that tests for post_hidden != 1 IF not querying a singular post (empty($p) and other matching checks). Or, add a new post_status called 'direct' that basically does the same thing (except by adding it to post status, it will 'disappear' everywhere until you add new exception code to all the other queries in the code... ;) ).
    -d
    http://www.chait.net

  6. Stevarino
    Member
    Posted 10 years ago #

    I'm amazed how often these problems come up. ;)

  7. francey
    Member
    Posted 10 years ago #

    there are also many php-powered guestbook systems, which from my experience are incredibly easy to use/install and modify.
    One I've used that doesn't use MySql is at http://design.definitelymaybe.org/guestbook
    I've also seen one that does use MySql at http://www.xentrik.net/php/guestbook.php

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.