• We have author-profiles made with author.php.

    Is there any chance to get comments under them, so that one can leave a message for the author in his profile?

    Here: https://www.song-line.eu/?author=3 I tried to put page into page, my author now looks like below, but now every author has the same comment field, but not an individual one, and after any comment the profile is not shown any more.

    I would be very gladful for help.
    Thanks
    Rita


    <?php get_header(); ?>

    <div id="page">

    <div id="content" class="narrowcolumn">

    <?php
    if(get_query_var('author_name')) :
    $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
    $curauth = get_userdata(get_query_var('author'));
    endif;
    ?>

    <h2 class="center">Autorenprofil von <?php echo $curauth->nickname; ?></h2>

    here comes the photo and the description and the author's posts, then I tried to insert the comments:

    <!--****Beginning comment field****//-->

    <?php
    query_posts('pagename=Friends/Songline'); // retrieve the child page of a parent
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="post">

    <h2 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?> <small> von <?php the_author_posts_link(); ?></small></h2>

    <div class="entrytext">

    <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>

    </div>
    </div>

    <?php comments_template('/commentsweg.php'); ?>

    <?php endwhile; else: ?>

    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>

    <?php endif; ?>
    </div>

    <!--****End comment field****//-->

    commentsweg is a commenttemplate that gives comments numbers and lets them appear in descending order.

    The problem with the code is, that I don’t know how to get the comment page for the current author (if it is possible).
    <?php
    query_posts('pagename=Friends/Songline'); // retrieve the child page of a parent
    ?>

    gives the page for Songline, but instead there should be something like current user, I think.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comments on author profile’ is closed to new replies.