mdrick
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Exclude ACF Fields in post_excerptIt’s perfect. It works very well. Thank you to have taken the time to answer and find a solution.
I have 0 or 1 that appear at the beginning of some excerpt. Could it be because of true/false custom fields?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Exclude ACF Fields in post_excerptFor an agenda I created two custom date fields with ACF.
A start dateevent_hour_start
(datepicker) and an end dateevent_hour_end
(datepicker).If I use the
some
option orvisible
I don’t have any excerpts.When I use
relevanssi_excerpt_content
hook it works but I don’t have fields in flexible content, I tried to useblocs_article_$_article_wysiwyg
andblocs_article_%_article_wysiwyg
syntax without success. Maybe I need to reindex when I change options?If I disable Relevanssi custom excerpts (I uncheck
Create custom search result snippets
). I no longer have the dates (and obviously no longer any excerpt).Forum: Plugins
In reply to: [Relevanssi - A Better Search] Exclude ACF Fields in post_excerptThank you for taking the time to explain this to me.
I’m a little confused.
What is your advice for building an excerpt with only selected custom fields (in addition to
the_content
from WordPress).I tried to set
Custom fields
option tosome
inindexing
tab but I still have results with custom fields that I don’t want.I tried to set
Custom fields
tovisible
and I have these famous date fields that appear in the excerpt.- This reply was modified 4 years, 5 months ago by mdrick.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Exclude ACF Fields in post_excerptHello thank you very much for your answer.
If I declare custom fields with
relevanssi_excerpt_custom_field_content
hook, only these fields will be used ?I don’t have more detail about this hook in the documentation. What parameters does this hook accept?
What’s the difference with
relevanssi_excerpt_content
?function custom_fields_to_excerpts($content, $post, $query) { $custom_field = get_post_meta($post->ID, 'article_technics_repeater', true); $content .= " " . $custom_field; $custom_field = get_post_meta($post->ID, 'article_wysiwyg', true); $content .= " " . $custom_field; return $content; } add_filter('relevanssi_excerpt_content', 'custom_fields_to_excerpts', 10, 3);
It is possible to hide link in content. I got https://www.soundcloud.com… for example ?
Thank you in advance
- This reply was modified 4 years, 5 months ago by mdrick.
- This reply was modified 4 years, 5 months ago by mdrick.
- This reply was modified 4 years, 5 months ago by mdrick.
- This reply was modified 4 years, 5 months ago by mdrick.
- This reply was modified 4 years, 5 months ago by mdrick.
- This reply was modified 4 years, 5 months ago by mdrick.