WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] For some reason, can't customize the "Read More" (6 posts)

  1. MK Safi
    Member
    Posted 5 years ago #

    Here's what I have in the index.php (I don't have post.php)

    <?php the_content('<span style="font-weight:bold;">Read this now...</span>'); ?>

    But what is displayed is "Read more" without any styling or anything. In fact, no matter what I have in "the_content()" The read more is always "Read more"

    Anyone have any idea why I'm unable to customize it?

    Thanks a lot,

  2. MichaelH
    Member
    Posted 5 years ago #

    Works okay for me using your code in my index.php. Here's the relevent part of the link from doing View Page Source in FireFox:

    <a href="http://localhost/wordpress262/?p=10#more-10"><span style="font-weight:bold;">Read this now…</span></a>
  3. MK Safi
    Member
    Posted 5 years ago #

    Here is the source code from Firefox
    <a href="http://dubaiemploymenttips.com/301/dubai-headhunters/#more-301" class="more-link">Read more</a>

    But here's what I have in my index.php

    <?php the_content('<span style="font-weight:bold;">Read this now...</span>'); ?>

    You see, WordPress isn't reflecting the changes I make on the theme. It's weird. Would you know what might cause this to happen?

  4. MichaelH
    Member
    Posted 5 years ago #

    Might review Template Hierarchy as you might not be putting the code in the correct template.

    On your blog you are saying it display "Read more" but the code says you want "Read this now...".

    If you continue this thread you might want to provide a link to your site.

  5. MK Safi
    Member
    Posted 5 years ago #

    That did it.

    I didn't know that WordPress looks at home.php first and then index.php. I changed the_content in home.php and it worked.

    Thanks Michael.

  6. RobertBruce
    Member
    Posted 5 years ago #

    Which files are you need ing to edit and in which folders are they found?

    I want to add an image to the Read More tag but have not been able to pick up which files you are discussing or in which folder they are located.

    Your help will be greatly appreciated.

    Thanks

    Rb

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.