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

    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’);

    #1091623

    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.

    #1091903

    Hi GWS,

    You’ll need to add this after Answer:

    <span class="more-link-arrow"></span>

    Best regards,
    Nikko

    #1092061

    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’);

    #1092573

    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

    #1093419

    That worked — thank you!

    #1093804

    Hi GWS,

    We’re glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Post Slider – change 'read more' text but keep arrow’ is closed to new replies.