Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS change read more button text

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #245979
    nvdwolk
    Participant

    Hi,

    I’m trying to change the text in the read more box.

    In what CSS file can i do this?

    http://lucengelhard.helpmeverder.nl/nieuws/

    Thank you in advance!

    Kind regards
    Niels

    #245984
    Paulie_D
    Member

    The text is hardcoded in the HTML…it has nothing to do with CSS.

    <a class="thb-btn thb-read-more" href="somehttps link" rel="permalink">
    Read more
    </a>
    

    If you aren’t doing that manually, it’ll be either in your JS or PHP .

    #245991
    deb
    Participant

    $(“a.thb-btn”).text(“Your New Text”);

    #245994
    nvdwolk
    Participant

    Deb, i’m a newbe, where do i put this string?

    I’ve put it in style.css but it doesn’t do anything.

    Thank you in advance!

    Kind regards
    Niels

    #246001
    Paulie_D
    Member

    That’s not CSS it’s Jquery/Javascript.

    As I said, I suspect that this text is being insered automatically server-side, either by JS or your PHP based on the thb-read-more class.

    It will be up to you to locate where this is being done.

    #246064
    nvdwolk
    Participant

    I can’t work it out Pauly_D and i can’t find any reference to a .js file in chrome code inspector. How am i supposed to know where to put this string?? I have FTP access, been searching for “read more” in the .js files, no result, how frustrating this is.

    Thank you anyway.

    Kind regards
    Niels

    #246066
    Shikkediel
    Participant

    It’s not in the JS, the line deb proposed was just to change the HTML with it afterwards. Since your page is linked to jQuery already, you could for example place some &lt;script&gt;&lt;/script&gt; tags around it and put that right before the closing &lt;/body&gt; tag. I’m not familiar enough with WordPress to tell you where the initial text would be in the PHP template. You should also be able to change that instead of using any script.

    #246068
    Beverleyh
    Participant

    I’m not familiar with WordPress either but, if it’s anything like Joomla, there will be a config option in an admin settings screen where you can change the “Read More” text, OR there may be a language template override file that you can create/edit instead.

    Anyway, try Googling something like “how to change the read more button text in WordPress”. I imagine you’ll find lots of help material from that, then it’s up to you to try them out until you find the one that does what you want.

    #246076
    nvdwolk
    Participant

    Paulie_D, Shikkediel and Beverleyh: thanks you very much for your respons, i really appreciate it!

    I didn’t want to dig deeper into it, in the meanwhile i solved it with a very fruitful plugin:

    https://nl.wordpress.org/plugins/loco-translate/

    Have a nice weekend and kind regards from The Netherlands!

    Niels

    #246099
    deb
    Participant

    Hey sorry for late reply but don’t try to use plugin. Below your footer paste this code:
    <footer>your footer here</footer>
    <script>
    jQuery(“a.thb-btn”).text(“Your New Text”);
    </script>

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.