WordPress.org

Forums

[closed] Change "more" link in twenty ten theme (15 posts)

  1. zeaks
    Member
    Posted 4 years ago #

    Is there an easy way to change this link? By default it reads "Continue reading →" I'd just like to change the wording without changing twenty tens main files. I'm using a basic child theme just to change font colors and minor things.

  2. Tara
    Member
    Posted 4 years ago #

  3. zeaks
    Member
    Posted 4 years ago #

    Yeah, I've read this a few times, as well as tried Aaron Jorbin tutorial on how he did it which just didn't work for me, maybe something changed since wp3.0 was released, i dunno.

    Just seems like a ridiculous amount of trouble just to change what one line says.

  4. thanks for bringing Aaron's link back up:

    using the 'translation' method, this might work, added in functions.php of the child theme:

    class Twentyten_Child_Text_Wrangler {
    function reading_more($translation, $text, $domain) {
      $translations = &get_translations_for_domain( $domain );
      if ( $text == 'Continue reading <span class="meta-nav">&rarr;</span>' ) {
       return $translations->translate( 'New text for read more <span class="meta-nav">&raquo;</span>' );
      }
      return $translation;
     }
    }
    add_filter('gettext', array('Twentyten_Child_Text_Wrangler', 'reading_more'), 10, 4);
  5. zeaks
    Member
    Posted 4 years ago #

    Thank you, that worked :)

  6. buffalogolfer
    Member
    Posted 4 years ago #

    Curious...where in the functions.php do you put that line of code?

    Thank you.
    Ron M.

  7. Curious...where in the functions.php do you put that line of code?

    anywhere but not so that it destroys the syntax.

  8. buffalogolfer
    Member
    Posted 4 years ago #

    I'm new to this...if you visit my home page http://buffalogolfer.com/wordpress, you'll see the article "Operation Don't Suck..."

    The problem I'm having is, I want to use the excerpt function, so I assign the more tag, but then it won't show the entire article when you click on "Finish reading..."

    Have you ever seen that before?

  9. clicking on the title or 'read more' should get single.php to display the post:

    - have you made any modifications to single.php?

    - can you check that the code of single.php has 'the_content();' inside the loop.

    you could paste the code of single.php into a http://wordpress.pastebin.com/ and post the link to it here; someone might have a look at it to see if there is anything unusual.

  10. buffalogolfer
    Member
    Posted 4 years ago #

    http://wordpress.pastebin.com/L99tmRge

    I don't know where the loop is, but I will look for 'the_content();'

    Thanks for your help.

  11. esmi
    Forum Moderator
    Posted 4 years ago #

    Don't edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

  12. buffalogolfer
    Member
    Posted 4 years ago #

    Dude//Dudette, I think you solved it.

    I had replaced content with excerpt in that script, I recall. Now that it is back to content, all seems well...I'll keep you posted.

  13. buffalogolfer
    Member
    Posted 4 years ago #

    esmi,

    I got the thirty ten theme from Aaron Jobin...it was acting up a bit, but now is in a good, calm place. Thank you for your input.

  14. buffalogolfer
    Member
    Posted 4 years ago #

    Here's another question...due to varied screen sizes, I had to abandon my plan to put sponsors in background, as the background .jpg did not flex with the various screen sizes. I have now placed the sponsors in the image below the menu and have lost a lot of color. I'd like to place another image between the menu and the top line that reads BuffaloGolfer.Com...any thoughts on what is needed for scripting?

    Thank you very much in advance.

    Ron M.

  15. @buffalogolfer

    your last post is unrelated to the topic - please start a new thread.

    [i am closing this one.]

Topic Closed

This topic has been closed to new replies.

About this Topic