Are families a custom post type?
If so, they won’t be included in the default WP search.
Try adding this to your theme’s functions.php
function lauren_include_post_types_in_search($query) {
if(is_search()) {
$post_types = get_post_types(array('public' => true, 'exclude_from_search' => false), 'objects');
$searchable_types = array();
if($post_types) {
foreach( $post_types as $type) {
$searchable_types[] = $type->name;
}
}
$query->set('post_type', $searchable_types);
}
return $query;
}
add_action('pre_get_posts', 'lauren_include_post_types_in_search');
Related Posts:
- Dealing with Many Meta Values, 30+
- Should I hint table index for search query on wp_post
- Block search SQL from happening
- How can I create a Bible search engine via WordPress? [closed]
- input data and output table [closed]
- Replace/Mute/Stop Search Query
- wp-cli search is returning ‘search’ is not a registered subcommand of ‘db’
- Add search bar to Custom Database Table in WordPress Dashboard
- Custom search query by category id
- SELECT SQL_CALC_FOUND_ROWS with wordpress search
- Understanding WordPress Search
- Search Character Set Problem
- Finding a page holding a specific string/URL that is used in the content
- Filtering data and saving query results
- Searchable database of members using multiple criteria / filters
- database search feature
- How do I find users by password?
- Order of search results based off of a backend custom field and also in alpha order
- Difference between partition key, composite key and clustering key in Cassandra?
- How SID is different from Service name in Oracle tnsnames.ora
- What is a relation in database terminology?
- Why WordPress choose data serialization over json_encode?
- Relaunch 4.2 utf8mb4 database upgrade
- Are There Any Plans for WordPress to Support Databases Other Than MySQL?
- Reset Post IDs to less than 64bit integer
- Where can I find the database changes between WordPress versions?
- how can get database name in wordpress?
- Does WordPress use the InnoDB engine for MySQL by default?
- $wpdb->prepare() warning in WordPress 3.5
- When is it appropriate to create a new table in the WordPress database?
- Best way to import users, post and categories from an external database
- Performance tips for a large user base [closed]
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- wp_options is GB in size
- Can’t update database after wordpress update from 3.8.1 to 4.4.1
- $wpdb variable throw this error Call to a member function get_results() on a non-object in
- Why does WordPress rely on an fully qualified site_url with a 15-step plan for moving a site?
- I have a problem with my WordPress DB after I tried to install multi-site
- Database sync between local and production
- WordPress and automated MySQL backups to a different host
- Database error Deadlock found when trying to get lock; try restarting
- Connect Second Database to WordPress
- update_user_meta() does not work
- Error establishing a database connection; After importing DB & Theme
- Check if column exists for one table in DB
- Get all images from this database table
- Delete transients in website
- wp_get_current_user always returns 0 continued
- Bulk-create posts from SQL database
- Allow logged in users to store and display some data
- I am switching laptops. I host my WP server through MAMP. I want to transfer [closed]
- How can i customize the export personal data file?
- How to merge two WordPress databases with the same structure?
- Auto login subdomain from main domain on single sites with different DB
- Logins from WP users table use on another page
- Error establishing a database connection problem in xampp saver
- I’m not able to get access to $wpdb [duplicate]
- “Error establishing a database connection” – Intermittent error on GoDaddy
- Importing Direct to DB – GUID Question
- Create table with dbDelta,can’t put any DEFAULT data
- WordPress database connection [closed]
- Changing between Local Host DB to Production DB and in reverse
- WordPress site to be able to connect with data on local machine of user
- Bulk Updating Post Date in 1 day Increments
- Query Column of Specific ID from Database Table
- Posting variables to WP database using $_POST method
- Debugging – logging database queries
- Link image with data from the wpdb
- Update multiple rows in one query
- How to direct my site to the proper URL without Dashboard
- access JSON results from wordpress database with wpdb
- contact form-7 drop downs not populating database [closed]
- Cloning blog to localhost via WAMP
- Button to update database row from admin menu
- How to search order using database frontend short code WordPress
- How do I get database rows from a custom table using wpdb?
- Move Non-WordPress users table to WordPress database
- How to check and get json object in WP database?
- Is there an actual way to synchronize ‘production’ and ‘develop’ WordPress databases?
- Lost database connection
- How to force set same page as homepage and blogpage in static page settings
- Getting values from form and saving in database but spaces are inserted instead of form values
- Can someoene please help with customization of a post?
- Exporting Post ID, Post Title, Primary Category and Primary Category ID
- how restrict user to give star ratings once for a post?
- Insert JSON output into WordPress Database
- How to set posts to draft in bulk based on the content of the post
- Confused over wp-config.php and ‘database user + database password + name’
- Performance bug – slow DB query
- Copy WordPress to new directory
- Changed meta_key value in structures, now dashboard shows zero users
- Why is converting my database to UTF-8 truncating entries?
- How can I work on a database along side a client?
- Preventing concurrent update of data
- How to add data from wordpress tables to new database tables you have created
- Creating Tables in WordPress Database
- Calling update_user_meta inside of another function doesn’t work
- How to back-up a database on IIS
- $wpdb->prepare returns empty array
- Where are database files of a WordPress website?