Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1094353

    Hi,

    i’d like to change the text of the Read More link in the post slider elements. There was this thread https://kriesi.at/support/topic/how-to-change-read-more/ and this one https://kriesi.at/support/topic/change-text-in-read-more-link/ but the file structure of the loop-index.php has changed since then. I tried editing the new file, adding an includes-folder yet it did not work. (Website access in the private section)

    Thanks and regards,
    Steffen

    • This topic was modified 5 years, 7 months ago by sugadaddy.
    #1095101

    Hey sugadaddy,
    Sorry for the late reply, thank you for the login, I added this function to your functions.php to change the “Read More” links.

    function custom_more_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $(".more-link").text("Learn More");
      });
      })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_more_script');

    Please adjust the text in the code “Learn More” to what you wish.

    Best regards,
    Mike

    #1111163

    Hello,
    I have the same problem but the function doesn’t work for me. I use the German WordPress and also the child theme. I also tried the other thread. Was there maybe an update?

    THx in advance

    #1111279

    Hi,

    @formwild
    your code in your child theme functions.php should look like this:

    function custom_more_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $(".more-link").text("Über das Buch");
      });
      })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_more_script');

    If this doesn’t work for you then we will need to login to examine it closer.
    Please open a new thread so we can assist, and include your admin login in the Private Content area, but as this is not your thread your login info will not be private if posted here.

    Best regards,
    Mike

    #1201735

    Hi Mike, the above function code works to change all of them. Is it possible to do an if statement so you could change a specific post id to have different text than the rest? or have a post that’s set to video say Watch video instead of read more like the standard post?

    #1201737

    All fixed, was able to just target .format-video

    function custom_more_script(){
    ?>
    <script>
    (function($){
    $(document).ready(function(){
    $(“.format-video .more-link”).text(“Watch video”);
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘custom_more_script’);

    #1202115

    Hi SAdesignsUnltd,

    Great, I’m glad that you found a solution and thanks for sharing.

    Best regards,
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.