Selectively Adding Pages to Query
-
What I need to do is include all “posts”, and just a few, select “pages” (a client’s requirements). It seems the relevanssi_where filter is what I need. Current (non working) code is:
add_filter( 'relevanssi_where', function ( $query_restrictions ) { $new = str_replace( 'WHERE ' , "WHERE posts.post_parent IN ( 663, 284 ) OR ", $query_restrictions ); return $new; });
I need the child pages of those 2 WP “pages”.
“Pages” is disabled in Search Option Settings. If I enable that, the index of course includes all pages.
Thanks.
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Selectively Adding Pages to Query’ is closed to new replies.