-
AuthorPosts
-
April 25, 2019 at 11:31 am #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.
April 28, 2019 at 10:22 pm #1095101Hey 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,
MikeJune 17, 2019 at 10:48 pm #1111163Hello,
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
June 18, 2019 at 12:26 pm #1111279Hi,
@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,
MikeApril 8, 2020 at 3:28 am #1201735Hi 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?
April 8, 2020 at 3:40 am #1201737All 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’);April 9, 2020 at 5:42 am #1202115 -
AuthorPosts
- You must be logged in to reply to this topic.