-
AuthorPosts
-
July 21, 2021 at 7:32 am #1311041
Hi guys
I have what I hope is a fairly simple request.
I would like the excerpt text that appears under each blog listing on the category page to also be clickable (to it’s full blog post), while removing the “Read More” text.
Please see attached image link to provide further clarification.
I found this old thread (https://kriesi.at/support/topic/excerpt-clickable-in-the-portfolio-grid/), but it’s referring to the portfolio grid, which is different from what I hope to achieve.
Also, would it be possible to restrict this function to specific blog categories? I would assume indicating which category IDs it applies to?
Any help would be greatly appreciated!
July 23, 2021 at 12:52 pm #1311849Hey Junms1,
Thank you for your patience and for the screenshot, we should be able to do this but I’m not sure that I was able to match my archive page layout to yours just from the screenshot, please link to your page so I can examine it closer.Best regards,
MikeJuly 23, 2021 at 1:08 pm #1311863Hi Mike
Thanks for the response. Please find the link in the “Private Content” section below.
One key thing to note – only the first post (the one at the top of the page) actually has the excerpt and links to it’s “full post”. All the other posts are “dummy” posts – they only contain the title and featured image, but don’t actually link to the “full post”.
Hope that makes sense! Let me know if you need anything else….
Thanks!
July 24, 2021 at 7:32 pm #1312103Hi,
Thank you for the link, your page is not the category archive page that I was expecting, it seems to be a page with a blog post element targeting the categorycategory-event-campaign
, but try adding this code to the end of your functions.php file in Appearance > Editor:function custom_script() { ?> <script> (function($) { $('.entry-content').on("click", function() { window.location = $(this).parents('.post-entry.category-event-campaign').find('.big-preview a').attr('href'); return false; }); $(".entry-content").mouseover(function(){ $(this).css("cursor", "pointer"); }); }(jQuery)); </script> <?php } add_action('wp_footer', 'custom_script');
to hide the “read more” button try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:
.post-entry.category-event-campaign .read-more-link { display: none; }
Best regards,
MikeAugust 3, 2021 at 7:11 am #1314072Hi Mike
Sorry for the delay in response – life got in the way a bit!
Anyway, your solution is perfect – thank you very much!
August 3, 2021 at 11:44 am #1314126Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Making the excerpt clickable as well’ is closed to new replies.