Feature Request: Make Relevanssi Custom Post Excerpts work with Elementor Posts Widget #27316
ur-krostitzer
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
What problem is your feature request going to solve? Please describe..
Hi, I am using Relevanssi as search plugin for my website. I have built a search results template using Elementor Pro which contains a "Posts" Widget to display the search results. Relevanssi handles the sorting by relevance and it works really well. The only thing that is missing now is the custom excerpt which highlights the search terms (and also adjusts the content displayed - the post excerpt - in the excerpt to include the search term at all times).
AFAIK Relevanssi overrides the
excerpt
/post_excerpt
attribute in theWP_Query
object. Therefore callingthe_excerpt()
should theoretically work.In the source code (
/modules/posts/skins/skin-base.php
) starting at line 994the_excerpt()
is invoked if the apply_to_custom_excerpt control is disabled (tried enabling and disabling but the result was identical).I have further tested the issue on an empty site with only Elementor (Pro) and Relevanssi installed to exclude other plugins or custom code causing the issue.
Describe the solution you'd like.
A way to replace the excerpt in the posts widget with a custom one (maybe even from a dynamic tag) would be super awesome.
Describe alternatives you've considered.
I have tried the Posts Archive widget as well as creating a Loop Grid with a Loop Item Template but I couldnt make either of those attempts work as intended.
Also I considered removing the Elementor Search Results Template and styling the default WP / Hello Theme Search Results Template with Custom Code CSS but it is a) a hassle and b) has to be kept an eye on in case some change caused by an update is breaking the layout.
Am I missing something? I have done hours of research on this topic but could not find other users that have solved this problem. If others that had the same issue would chime in I would be forever grateful as I am unsure if this is a Elementor or Relevanssi issue (I have contacted the Relevanssi dev as well).
Thanks for your time.
Additional context
No response
Agreement
Beta Was this translation helpful? Give feedback.
All reactions