Konstantin Agafonov
Forum Replies Created
-
“Index Shortcode Content” checkbox is checked. Test post_content cluster for pages with custom Gutenderg blocks is empty.
Can it be due to Polylang plugin installed?
UPD ^^^ post_content cluster stays empty
but page_content cluster is added and it has right valueMy wp version is 5.8.3
Regarding acf fields. Since their values all go to page content I decided to give the whole post content to the index in the hook wpfts_index_post.
But then I realized that page content should go to index by default. I have pages built in Gutenberg with custom blocks. Acf fields are connected to gutenberg blocks and there is some content in the pages at the frontend. However I ran usual indexing and I’m testing a page indexing in the plugin interface and it gives me empty post_content cluster.
If I do so:
/** * Add page content to search index */ add_filter('wpfts_index_post', function($index, $post) { if ( $post->post_type == 'page' ) { $page_content = strip_tags( apply_filters( 'the_content', get_the_content( post: $post->ID ) ) ); if ( ! empty( $page_content ) ) { $index['page_content'] = $page_content; } } return $index; }, 3, 2);
…then the test index page gives non-empty post_content cluster cluster.
Also I’ve a question concerning Polylang compatibility. Should I ask it here or start a new topic?
Forum: Plugins
In reply to: [Yandex.News Feed by Teplitsa] Яндекс перестал загружать новостиОтключил кэширование. Пока полёт нормальный.