• Resolved nd54448

    (@nd54448)


    Hi
    How can we change the “read more” part and customize de button ?
    I tried this in the functions.php of child theme, but no change :

    function modify_read_more_link() {
    return ‘Your Read More Link Text‘;
    }
    add_filter( ‘the_content_more_link’, ‘modify_read_more_link’ );

    thanks
    N

Viewing 15 replies - 1 through 15 (of 19 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, you almost found the solution ??
    Use this filter “ocean_post_readmore_link_text”.

    Thread Starter nd54448

    (@nd54448)

    Hi
    Thanks for the quick answer… I haev replaces but no change… After I read some more in the codex, I found that I need to change in fonctions.php of the child like this :

    function child_theme_setup() {
    // override parent theme’s ‘more’ text for excerpts
    remove_filter( ‘excerpt_more’, ‘twentyeleven_auto_excerpt_more’ );
    remove_filter( ‘get_the_excerpt’, ‘twentyeleven_custom_excerpt_more’ );
    }
    add_action( ‘ocean_post_readmore_link_text’, ‘child_theme_setup’ );

    Now, this removed the “Continuer la lecture”, the french of “read more” with an empty button. Can you explain it, step by step for newbies like me :
    1. how to do it
    2. can the button be customized

    Thanks
    (even if it can’t be done, OceanWP is still a great theme !)
    N

    Theme Author oceanwp

    (@oceanwp)

    Your first filter was good, here the code you need to add in your functions.php file:

    function my_read_more_text() {
    	return 'mon texte ici';
    }
    add_filter( 'ocean_post_readmore_link_text', 'my_read_more_text' );

    For the style, have you an example of what style you want, I will give you the CSS code to enter in your style.css file.

    Thread Starter nd54448

    (@nd54448)

    Hi
    Thanks, I got it.. Now it works…
    For the Read more button : I want to make it in the same style as the other buttons (completely blue with change in color when hover on it).
    Also : what is “Leave a comment” filter ?
    thanks a lot
    N

    Theme Author oceanwp

    (@oceanwp)

    Here the CSS code you need to add in the style.css file of your child theme:

    body .blog-entry.large-entry .blog-entry-readmore a {
        background-color: #13aff0;
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        padding: 14px 20px;
        border: 0;
    }
    
    body .blog-entry.large-entry .blog-entry-readmore a:hover {
        background-color: #0b7cac;
        color: #fff;
    }

    Change the color as you want.

    There is no “Leave a comment”, you mean “Leave a reply”?
    You want translate the words in french, right? The theme has been translated in french, you just need to select this language in Settings > Generals and all the theme words will be in french ??

    Thread Starter nd54448

    (@nd54448)

    Hi
    Thanks again for the quick answer… That’s great !
    For the comment : I am actually using a french version, I would like to change the :
    “Laisser un commentaire”
    CET ARTICLE A 4 COMMENTAIRES
    but I can not find these
    thanks a lot

    Theme Author oceanwp

    (@oceanwp)

    This is the “ocean_comments_title” filter.
    Or you can directly doing this by copy/paste the comments.php file directly into your child theme and edit the file in your text editor.

    Thread Starter nd54448

    (@nd54448)

    ok, great !
    thanks for all..
    Closed topic ??
    (une entrée fracassante des thèmes fran?ais dans le monde wordpress ! félicitations)

    Theme Author oceanwp

    (@oceanwp)

    You’re most welcome ??
    (merci beaucoup)

    Thread Starter nd54448

    (@nd54448)

    Well, I think I was too quick in closing the line… (I am writing in english so that your answers to be useful for more users).
    I can not find the “Leave a comment’, ou “Laisser un commentaire”.
    I was looking even in the po file (even though I think it is not kosher to play directly with the po files).
    thanks again (I also mentioned in another file that there is a typo in the “Research” answer.. there is a “CHE” missing..If I search for the word TEST, the answer is
    “7 Résultats de recher trouvés”
    Regards
    N

    Theme Author oceanwp

    (@oceanwp)

    The “Leave a comment” come from WordPress, you need to select your language in Settings > General to translate it.

    For “7 Résultats de recher trouvés”, unzip this file: https://www.dropbox.com/s/e3jqhuosqtcpbbv/fr_FR.zip?dl=0
    Copy/paste it in oceanwp/languages and tell me if the issue is solved.

    Thread Starter nd54448

    (@nd54448)

    Hi again
    No change after replacing the po/mo files..
    I get this answer for a search :
    ” Résultats de recher trouvés”

    For “Laisser un commentaire”, I am using french language, but I want to change this to “Veuillez laisser un commentaire”, or something like that.
    thanks

    Theme Author oceanwp

    (@oceanwp)

    I don’t find ”Résultats de recher trouvés” in the fr_FR.po file, can you send me the url of the search page where you have this issue?

    For “Laisser un commentaire”, I saw this, I never try so I don’t know if the code is good:
    https://isabelcastillo.com/change-worpress-leave-a-reply-text

    Thread Starter nd54448

    (@nd54448)

    Hi
    For the “Leave a comment”, the link you send me works fine.
    For the “recher” my site is private; I setup a mockup site at recours.nusi.fr
    regard

    Theme Author oceanwp

    (@oceanwp)

    Hi, great. For the “recher”, it is fixed for the next release ??

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘change the “read more” in excerpt’ is closed to new replies.