• I have multiple authors contributing posts on my blog but there is nothing to automatically specify who is posting each post.

    I am using the (adspress) theme at https://www.blogohblog.com/download/adspress.zip . I tried editing the index.php and looking for “the loop” but cant find anything related to the author of each post.

    Anybody who can solve this will be deemed the ultimate champion of Word Press in my eyes!

Viewing 8 replies - 1 through 8 (of 8 total)
  • if you look in your template folder you’ll find kubrick, which is a nice simple template that has the author code in it. here’s what I use:

    '
    <p>Written by <?php the_author() ?> <span class="edit"><?php edit_post_link('Edit'); ?></span></p>
    <p><?php the_time('F jS, Y'); ?> <?php _e("at"); ?> <?php the_time('g:i a'); ?></p>
    '

    I do like the ‘ultimate champion of word press’ but I really can’t take title for just copy/pasting from my own site ??

    where do you copy and paste that code into?

    Hi,

    You can add author code in page.php file of current theme…please check this link for all Author tags:

    https://codex.www.ads-software.com/Template_Tags#Author_tags

    Sorry, I am a newbie. If I go to the page template link on the sidebar when I am in the admin panel under Presentation, Editor…where do I paste this code?

    Hi,

    just add this code in page.php

    <? php the_author(); ?>

    It should fix the case.

    [signature moderated Please read the Forum Rules]

    OK, thanks for the help, but where inside of the page.php page do I paste it. I have tried several places and it does not show in the post who the author is. Thanks!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    On your index.php THIS is your loop

    <?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <div class="allinfos"><?php the_time('F jS, Y') ?> <span class="comments"><?php comments_popup_link('No Comments &nbsp;', '1 Comment &nbsp;', '% Comments &nbsp;'); ?> </span> <span class="category">Posted in <?php the_category(', ') ?></span> <!-- by <?php the_author() ?> --></div>
    
    					<?php the_content('More &raquo;'); ?>
    
    <div class="allinfos"><br /><?php the_tags('Tags: ', ', ', ' '); ?> <?php edit_post_link('| Edit', '', ''); ?></div>
    			</div>
    <div class="doth"></div>
    		<?php endwhile; ?>

    See where it says <!-- by <?php the_author() ?> -->? Change that to by <?php the_author() ?>

    And on page.php, you want to put it between the two ‘while’ statements.

    Ipstenu, thank you. I got the index.php done but am not sure where the two “While” statements are. Here is what I see:

    <?php get_header(); ?><?php the_author(); ?>

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

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2><?php the_title(); ?></h2>
    <div class=”entry”>
    <?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?>

    <?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>

    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’); ?>
    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>
    <? php the_author(); ?>

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to display the author of each post?’ is closed to new replies.