SearchWP Related default arguments for getter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use the saved keywords from the meta box | |
$keywords = get_post_meta( get_the_ID(), $searchwp_related->meta_key, true ); | |
$defaults = array( | |
'engine' => 'default', // Engine to use | |
's' => $keywords, // Terms to search | |
'fields' => 'all', // Return post objects, use 'ids' to return IDs | |
'posts_per_page' => 3, // How many results to return | |
'log' => false, // Log the search? | |
'post__in' => array(), // Limit results pool? | |
'post__not_in' => array() // Exclude posts from results? | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment