• hi community,

    I have a small challenge:
    I’m coding a very cms heavy wordpress install right now, and I want to implement a function to let users leave comments to authors – publicly.

    my vision is using it like the normal comment function (so akismet/spam karma are still working), but only with for authors.
    so, wenn somebody views the author.php, he can see and add comments.

    any ideas?
    thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hmm. Tricky.

    One possible solution is to make sure each author has (for their first entry on the blog) an introductory post. Then in author.php use something like:

    <?php
    query_posts('showpost=1&orderby=date&order=ASC&author=' . get_query_var('author'));
    $wp_query->is_single = true;
    if(have_posts()) : the_post();
    ?>
    <?php comments_template(); ?>
    <?php endif; ?>

    Of course, you can display whatever you want from the post, etc. Just be aware that posting a comment will take you to the single post page, not back to the author query page (so, anyone have a useful comment redirect hack?).

    (so, anyone have a useful comment redirect hack?)

    Ah yes, stick this somewhere in the comment <form> element (in your theme’s comments.php):

    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />

    (I love answering my own questions…)

    Thread Starter pampfelimetten

    (@pampfelimetten)

    okay, i thought of that, but I threw the idea away. Well, maybe i’ll give it another try, lets see.

    What do you think of seperating the comments with the field comment_type? so, adding a fourth option, for example author, and filter it that way? and entering the author_id in the post_id field?
    but then: how can i prevent it from showing in the comment section of the post with the same post_id?

    hi Kafkaesqui,, Im sorry
    but it doesnt work on my website
    It does insert comment you type in,, but after you send it, it will be redirected to single post written by the author
    And,, the comment is display both on the single post and in author page
    would u give me some advance tutorial

    thx you so very much sir.

    here is my site http://klikbelajar.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘comment author page’ is closed to new replies.