We added the following script to functions.php so we could change the ‘read more’ text to ‘Answer’. When we do this, the text does change but the arrow disappears. We want to keep the arrow. Any suggestions? Thanks.
function custom_more_link(){
?>
<script>
(function($){
$(document).ready(function(){
$(“.more-link”).text(“Answer”);
});
})(jQuery);
</script>
<?php
}
add_action(‘wp_footer’, ‘custom_more_link’);
Sorry, I meant to also add that we tried to change the ‘read more’ using the solution on this thread: https://kriesi.at/support/topic/read-more-link/#post-356003 but it only worked if we made the change directly to the Enfold copy. Creating a child-theme copy of the folders path and file did not work. We are fine with either changes to the postslider.php file in child theme or editing function.php, but neither method is working well for us. Your insight is appreciated–thank you.
Hi GWS,
You’ll need to add this after Answer:
<span class="more-link-arrow"></span>
Best regards,
Nikko
Thank you for responding so quickly. When I add the span class the arrow shows up, but ignores the change from Read more to Answer. The syntax appears to be correct. What I am missing, please?
function custom_more_link(){
?>
<script>
(function($){
$(document).ready(function(){
$(“.more-link”).text(“Answer”) <span class=”more-link-arrow”></span>;
});
})(jQuery);
</script>
<?php
}
add_action(‘wp_footer’, ‘custom_more_link’);
Hi GWS,
Try to use this code:
function custom_more_link(){
?>
<script>
(function($){
$(document).ready(function(){
$(".more-link").html("Answer <span class='more-link-arrow'></span>");
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'custom_more_link');
Hope it helps.
Best regards,
Nikko
That worked — thank you!
Hi GWS,
We’re glad that we could help :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko