Edgar Pfandler
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proYes, relevanssi_pre_excerpt_content does at it should be.
Maybe you could add this to your documentation that some themes, like pro from theme.co, needs the post object instead of the content string.
Thanks again for the patience.
*****
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proEureka, I got it to work now.
The hook is called, there was an error in my error log that went to the wrong file. Sorry for about that!
Also, I have now found the correct function for processing the content filter. pro theme needs the post object to correctly process its custom routines.
Here is the correct code, maybe helpfull for others.
add_filter( 'relevanssi_post_content', 'relevanssi_filter_the_content', 10, 2 ); function relevanssi_filter_the_content( $post_content, $post ) { return apply_filters( 'the_content', $post->post_content ); }But i still got the wrong content in the search results exception. Is there a hook to filter this output with the object?
And many many thanks for the support and patience!!!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proIf took a second look on the relevanssi_index_content function in your /lib/indexing.php
The relevanssi_index_content function is only called if i edit and save a post directly, then the hook works of course too! The function is NOT called during the rebuild of the whole index! I’ve checked this several times.
I’ve sent a mail with a video.
I’ve tried with WP Safe Mode, and disabled all other plugins. The messages still persists.
Update: the issue was by the Hoster! The module unset wasn’t installed. Just for record.
Sorry for the late respond, had a lot to do last time.
I can make a video, can I sent it to you over a support email?
I doesn’t set it on resolved! It is still present!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proYes i have some pages restricted with ultimate member, but of course not the imprint page. But i will contact their support about this.
About the hook, it fires only if i edit a page directly, after hitting safe, the hook work. But it didn’t fire when using the index all button on the general relevanssi setting page.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proOk, first question: what could it be that relevanssi_post_content filter didn’t fire?
Second question: No, i’ve removed all stopwords and my name is indexed on the imprint page. If i search for it while i’m logged in i found all related posts. If i’m logged out, the search redirect to the start page without showing anything, not even “no search results found”.
But i found the reason now: It’s the ultimate_member plugin that prevents this. Maybe a bug?Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proYou read my post before, about the correct indexing with the filter?
And could it be that the Name of 1. User (of course Admin) is filtered out by the search?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proAnd by the way, maybe you could use this filter for output the search result? Because i got this shortcodes in the excerpt highlight search results too.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proYes, that was the bull’s eye.
After I called the “the_content” filter directly, all keywords were now found! But it still does not explain why the relevanssi_post_content filter function were not triggered!
// $contents = apply_filters( 'relevanssi_post_content', $post_object->post_content, $post_object ); $contents = apply_filters( 'the_content', $post_object->post_content);Forum: Plugins
In reply to: [Relevanssi - A Better Search] Dynamic Content with theme proRelevanssi creates an index, and it also indexes some words for the page I tested with the Relevanssi debugger as well.
The filter hooks I tested with my own error log function, which simply writes the text I pass to a log file. This should happen in any case as soon as this hook is called.
function bhstein_error_log ($path, $log) { file_put_contents ("error.log", current_time ("[Y-m-d H:i:s] ") . "(" . $path . "): ". $log . "\n", FILE_APPEND);}`
And the call:
add_filter( 'relevanssi_post_content', 'rlv_apply_the_content' ); function rlv_apply_the_content( $content ) { $output = apply_filters( 'the_content', $content ); bhstein_error_log ("relevansi", "content: " . $content . " | filter: " . $output); return $output; // return apply_filters( 'the_content', $content ); }