• I was wondering if it would be possible to show the author’s name on the main page.

    I know that there is an option to show the author’s name on the post footer but you have to click on the actual post to see it. I would like my visitors to see it on the main page.

    Could this be added to the options or someone could show me how to do it?

    Thanks for your help.
    Great theme by the way.

    Just in case: https://trip.glogowski.ca
    Gadi

Viewing 5 replies - 1 through 5 (of 5 total)
  • Go into editor from your control admin panel, open index.php, search for the end of the loop, and find a right place to insert next code.

    <?php the_author_posts_link(); ?>

    If you can copy and paste the loop from that file I can tell you exactly where to insert it.

    Thread Starter gadig

    (@gadig)

    This is the code (I am not sure where to put it and how it would look better.

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <h2><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <div class="comm_date"><span class="data"><span class="j"><?php the_time('j'); ?></span><br /><span class="my"><?php the_time('M/y'); ?></span></span><span class="nr_comm"><?php if($dsq_version){ echo '<a class="nr_comm_spot" href="'; echo the_permalink(); echo '">N/A</a>';  }else{ ?><a class="nr_comm_spot" href="<?php the_permalink(); ?>#respond"><?php echo comments_number('0', '1', '%' ); ?></a><?php } ?></span></div><div class="clear"></div>
    <?php the_content(''); ?>
    
    <div class="cat_tags"><div class="category"><?php $tag = get_the_tags(); if (!$tag) { ?><?php _e('Filed under:','lightword'); ?> <?php the_category(', '); } else { ?><?php _e('Tagged as:','lightword'); ?> <?php the_tags(''); } ?></div>
    <div class="continue"><?php $pos=strpos($post->post_content, '<!--more-->'); if($pos==''){ ?><a class="nr_comm_spot" href="<?php the_permalink(); ?>#respond"><?php comments_number(__('No Comments','lightword'), __('1 Comment','lightword'), __('% Comments','lightword')); ?></a><?php }else{ ?><a title="<?php _e('Read more about','lightword'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>#more-<?php echo $id; ?>"><?php _e('Continue reading','lightword'); ?></a><?php } ?></div><div class="clear"></div></div><div class="cat_tags_close"></div>

    Thanks for your help.

    Gadi

    I was also wondering how to do this, so I hope someone will help us out soon.

    Add this after or before <?php the_content(”); ?>

    <?php if ($lw_post_author == "true" && is_attachment() != TRUE) : ?>
    <div class="about_author">
    <div class="alignleft"><?php echo get_avatar( get_the_author_id(), '28' );   ?></div>
    <div class="alignleft"><h4><?php _e('Author','lightword'); ?>: <a href="<?php the_author_url(); ?> "><?php the_author(); ?></a></h4>
    <?php the_author_description(); if(!get_the_author_description()) _e('No description. Please complete your profile.','lightword'); ?></div><div class="clear"></div> </div>
    <?php endif; ?>
    Thread Starter gadig

    (@gadig)

    Thanks. That helped.
    I would like to request this feature for future updates.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show author in main page’ is closed to new replies.