Read more-buttons on listings

I have tried to add a “Read More” button on the listings page, that shall redirect to the listing, but i cant get it to work. Anyone who can help me with this?
Thank you :slight_smile:

add_action('wp_footer', function() {
    ?>
<script>
jQuery(document).ready(function($) {
    $('.hp-listing').each(function() {
        var listingUrl = $(this).find('.hp-listing-title a').attr('href');
        $(this).append('<a href="' + listingUrl + '" class="button">Read more</a>');
    });
});
</script>

<?php
});

Hi,

Unfortunately, we cannot help with a specific code, as it is beyond our scope. If you’re familiar with coding, there are two ways to go about it:

  1. Use the template hook on the listing view block and customize it, please check these samples: Search · user:hivepress template · GitHub

  2. Or overwrite template parts using child theme: How to override template parts - HivePress Help Center

​I hope this is helpful to you.