How to put "posted by" link along the posts?

Discussion in 'WordPress' started by mtsandeep, Oct 4, 2008.

  1. #1
    I am now building a new wordpress site. I have selected a theme.
    The theme i use doesn't have the "posted by" link in it. I need to add it.how to do it?:confused:

    I will be allowing multiple authors to post so i need to make a profile page for each authors. How to make profile page and how to link the page with author's name?:confused:

    Please help me,
    Thanks:)
     
    mtsandeep, Oct 4, 2008 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Cash Nebula, Oct 4, 2008 IP
  3. mtsandeep

    mtsandeep Active Member

    Messages:
    218
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #3
    do i need to create author.php?
    Is the "index.php", you said here inside the template folder?
     
    mtsandeep, Oct 4, 2008 IP
  4. scoopy82

    scoopy82 Active Member

    Messages:
    838
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    70
    #4
    Nope... "author" is not a page... but a variable which is already store in your database. You are just "asking" for this variable to be posted on your page.
    Yup... that would be the correct index. You can also edit it directly from within your wp-admin dashboard. Its under Design --> Theme Editor.
     
    scoopy82, Oct 4, 2008 IP
  5. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If author.php is not found, Wordpress uses archive.php for the author pages.

    Also, every theme should have index.php and style.css.
     
    Cash Nebula, Oct 5, 2008 IP
  6. mtsandeep

    mtsandeep Active Member

    Messages:
    218
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #6
    I read one of the online blogs and created a author.php file, and linked it in the main index.php file.
    Now i can see the posted by link in the main page but when i click the post and go to the post page, the link is not there.
    So where should i actually paste the code ? and where is "under the post title"
    I don't know anything...please help me...thanks
     
    mtsandeep, Oct 5, 2008 IP
  7. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Download a few themes and see how they do it. The BloggingPro theme is a good example:
    
    <div class="PostHead">
     <h1 class="title"><a href="#"></a><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
     <p class="PostDate">
       <strong class="day"><?php the_time('d'); ?></strong>
       <strong class="month"><?php the_time('M'); ?></strong>
     </p>
      <p class="PostInfo">Posted by <?php the_author() ?> as <em><?php the_category(', ') ?></em></p>
    </div>
    
    Code (markup):
     
    Cash Nebula, Oct 5, 2008 IP
  8. GuardianAngel

    GuardianAngel Active Member

    Messages:
    624
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #8
    I tried this just now and it worked for me. However, I removed it again as it looked weird due to big space being used. Thanks for sharing, though.
     
    GuardianAngel, Oct 5, 2008 IP
  9. mtsandeep

    mtsandeep Active Member

    Messages:
    218
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #9
    Thanks, Its working fine now, It was the template that caused the problem. I changed it and now added it to every page.
     
    mtsandeep, Oct 5, 2008 IP