Need to search specific content in flexible content
-
Hi there,
I need to search for specific content from the regular page! Most of my pages are using flexible content and inside Wysiwyg Editor!
I can’t make it happen to display results in the search page, the closest article to my issue i found is this https://wordpress.stackexchange.com/questions/332605/query-pages-for-use-of-a-flexible-content-layout
When i use code suggested above, it displays pages where the layout is used!
<?php $flex_content_name = 'services'; $layout_name = 'photo_with_text'; $args = array( 'posts_per_page' => -1, 'post_type' => 'page', 'meta_query' => array( array( 'key' => $flex_content_name, 'value' => '"'.$layout_name.'"', 'compare' => 'LIKE' ) ) ); $the_query = new WP_Query( $args ); ?>
I’m not sure where do i add my subfield name?
Did anybody come across a similar issue and have any suggestions?
Thanks in adavnce
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Need to search specific content in flexible content’ is closed to new replies.