Getting Your WordPress Byline to Display

Posted on June 9, 2008
Filed Under WordPress, php |

The other day a friend of mine started a new blog called Transformation of the Suns. He found a WordPress theme he liked, but after he added his first post, he noticed that his name didn’t appear on the page.

He asked me if I could help.

If you are an expert in php programming this would be easy. But for those of you who are not, here are the easy steps to customize your WordPress blog so that your name appears under your blog post title.

The first step is to edit the index.php page of your theme. You will find a line of code something like this: <div class=”main_title”><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></div>

You need to insert this small piece of code just before the closing </div> tag. Here is what you need to insert: <h5>by <?php the_author() ?></h5>

Obviously, it doesn’t have to be surrounded by a <h5> tag, but you do need to format it somehow. In this case, I opened up the style sheet and added a h5 heading and styled it appropriately, giving it a letter spacing of .4em.

And there is one more step. You need to add the same small bit of code to the single.php page to the same line as on the index.php page. When finished, the line looks like this: <div class=”main_title”><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a><h5>by <?php the_author() ?></h5>
 </div>.

That’s it.

This little bit of tweaking is important if you ever want to have a guest writer create a post on your blog. Everybody wants to receive their due credit.

Comments

10 Responses to “Getting Your WordPress Byline to Display”

  1. ????? ???????? on March 18th, 2010 10:58 pm

    He asked me if I could help.
    If you are an expert in php programming this would […….

    ? ?????????, ??, ??-?????, ?? ?????????? ??????. ??????? ??????? ???. ?????? ??? ? PM, ?????????….

  2. Kylie BattName on April 12th, 2010 12:34 am

    ??????????)))…

    ???????????? ?????? ?????? The other day a friend of mine started a new blog called Transformation of the Suns…..

  3. Kylie Batt on May 4th, 2010 5:33 am

    ? ?????????, ????? ?? ???? ??????, ?? ??????, ??? ?? ??????? ?????????? ???????….

    ???????? ??????????? He asked me if I could help.
    If you are an expert in php programming this would […….

  4. Kylie Batt on May 4th, 2010 8:14 am

    ??????? ????????? ????? ?????…

    ????????? ?????? He asked me if I could help.
    If you are an expert in php programming this would […….

  5. esrip-326 on May 14th, 2010 2:16 pm

    esrip-326…

    ????? ??????? ???? ?? ?? ?????? http://www.vn7.ru/, ??????? ??? ????? ????????? ?????

  6. KELLY on July 2nd, 2010 7:08 pm


    Pillspot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. Low price drugs. Buy drugs online

    Buy:Soma.Zithromax.Viagra Professional.Tramadol.Cialis Professional.Cialis Super Active+.Viagra.VPXL.Maxaman.Cialis Soft Tabs.Cialis.Viagra Soft Tabs.Viagra Super Force.Levitra.Viagra Super Active+.Propecia.Super Active ED Pack….

  7. WALLACE on July 21st, 2010 1:06 am


    Medicamentspot.com. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. High quality drugs. Order drugs online

    Buy:Synthroid.Actos.Zyban.Valtrex.Nexium.Prevacid.Mega Hoodia.100% Pure Okinawan Coral Calcium.Lumigan.Accutane.Petcam (Metacam) Oral Suspension.Zovirax.Human Growth Hormone.Retin-A.Arimidex.Prednisolone….

  8. BOB on July 21st, 2010 7:17 am


    Medicamentspot.com. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. No prescription pills. Buy drugs online

    Buy:VPXL.Viagra.Propecia.Viagra Soft Tabs.Levitra.Maxaman.Viagra Professional.Viagra Super Force.Cialis Soft Tabs.Cialis Super Active+.Tramadol.Viagra Super Active+.Super Active ED Pack.Cialis.Zithromax.Cialis Professional.Soma….

  9. Padlock on August 30th, 2010 1:57 am
  10. GILBERT on September 7th, 2010 12:00 am


    CheapTabletsOnline.com. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. High quality pills. Order pills online

    Buy:Arimidex.Retin-A.Accutane.Nexium.Prednisolone.Synthroid.Valtrex.Mega Hoodia.Human Growth Hormone.Zovirax.Actos.Zyban.Prevacid.Lumigan.Petcam (Metacam) Oral Suspension.100% Pure Okinawan Coral Calcium….

Leave a Reply