Forums

[resolved] How to change font color for previous/next post link (8 posts)

  1. shirls
    Member
    Posted 3 years ago #

    Hi all,

    I tried to search around but still can't get the answer. Hope to get some of your help. Thanks for your time in advance.

    I added the previous/next post link in single.php, as followed

    << <?php previous_post_link('<strong>%link</strong>'); ?>   ||    <?php next_post_link('<strong>%link</strong>'); ?> >>

    It works well but I hope to change the font color, I tried to work within the php, like

    << <?php previous_post_link('<strong><font color="#e68e09">%link</font></strong>'); ?>   ||    <?php next_post_link('<strong><font color="#e68e09">%link</font></strong>'); ?> >>

    But with no results.

    I hope to try on the css, but don't know how to.

    Any tips?

    Thanks in advance for your help and time. Much appreciated !

    cheers
    Shirls

  2. stvwlf
    Member
    Posted 3 years ago #

    post a URL please

  3. shirls
    Member
    Posted 3 years ago #

    Oh sorry, the following is the URL :
    http://shirlschong.com/

    My blog is in chinese.

    Thanks for your help !

  4. stvwlf
    Member
    Posted 3 years ago #

    Hi

    I looked for prev/next links on your Chinese blog (I don't speak any Chinese) and couldn't find them. Found your English blog and couldn't find any there either. If you can show me where the links are you want to change the color of, I can show you how to do it.

  5. shirls
    Member
    Posted 3 years ago #

    Hi stvwlf,

    I am sorry if I don't explain well. And really thankful for your help.

    I have not updated my English blog for a while. The prev/next links are in the Chinese blog. Please click on a post, then in the single post page, you will see a 'share and enjoy' section, right after that there is the prev/next link. The prev/next is also just before the '相关文章 (automatically generated)' (which is the 'possibly related posts' section).

    Hope the above help. Once again, I really really appreciate your time and help !!

    cheers
    Shirls

  6. stvwlf
    Member
    Posted 3 years ago #

    hi Shirls

    I found the line you refer to. Could you please post the line of PHP code from single.php that is generating that line?

    thanks

  7. shirls
    Member
    Posted 3 years ago #

    Hi stvwlf,

    Opps, sorry for late reply, I did not check the forum till today.

    Below is the code that generating that line:

    << <?php previous_post_link('<strong>%link</strong>'); ?> || <?php next_post_link('<strong>%link</strong>'); ?> >>

    Thanks again !!

  8. shirls
    Member
    Posted 3 years ago #

    Hi stvwlf,

    I figured out myself. I did not know I have to add a <p> tag to make it work.

    I edited the codes to the following, and it worked.

    <p><font color="#e68e09"><< <?php previous_post_link('<strong>%link</strong>'); ?> || <?php next_post_link('<strong>%link</strong>'); ?> >> </font></p>

    I am really thankful for your time and help. Thanks again !

Topic Closed

This topic has been closed to new replies.

About this Topic