I found the problem, this function was causing the problem….
function include_custom_post_types( $query ) {
$custom_post_type = get_query_var( 'post_type' );
if ( is_archive() ) {
if ( empty( $custom_post_type ) ) $query->set( 'post_type' , get_post_types() );
}
if ( is_search() ) {
if ( empty( $custom_post_type ) ) {
$query->set( 'post_type' , array(
'post', 'page', 'website_bookmarks'));
}
}
return $query;
}
Related Posts:
- the_author_posts_link css class
- How do I get the author’s page url from their ID?
- Current post’s author name in the author meta tag
- Allow authors to post only in categories they create in WordPress
- Missing Author Information
- Get_the_author doesn’t return author name
- the_author() not working outside the loop
- When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?
- How Can I Call Up The Author’s Name on a Post
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- Retrieving Author ID in wp-admin area
- Storing Array from returned database query and using the array in a new query
- Getting the author name on author archive page
- edit_comment_link is not showing for comment author
- Remove author link wherever author’s name is display
- Noindex Posts From Certain Authors In WordPress
- Noindex subscriber author page
- How to hide the author box of a specific user?
- Comment_author_url doing nothing
- Create condition for Author bio Social Links
- How to change the author box selection on a post to a custom taxonomy
- Remove Author Links
- WordPress redirect to a subpage – how to create a template for subpage?
- Show all people who commented on all posts by an author
- Show sidebar only to author of post
- Posts missing on author page
- Return author name as a tag using get_author
- Send Notification to all users that followed some author
- Following/Followers Users list Using Ajax Pagination inside Author Profile
- Send email to users when they get new followers
- How to make a parent page for author.php?
- Changing WordPress author name in database
- Showing the authors username and bio on custom author.php
- How can I output the slug of a comment author?
- How to have Function of a plugin using global vars into a shortcode?
- Assign new post author IF another user in custom field on post transition
- Create guest author page via php
- the_date() not working
- How to return number of found rows from SELECT query
- What is the best php version to use with WordPress?
- WP-API v2 Custom Endpoint Response Formatting
- How to call a function only once (global variable scope)
- Multiple is_page() in page.php
- Get author full name
- Where should I install a PHP library into WordPress so that code in a webpage can activate it?
- Check php version before theme activation
- How to make WordPress plugin check for database changes and then do something?
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Extract the first oembed url inserted on the content of a post
- WP API V2 returning Invalid User ID
- Why does $_SESSION only work when I am logged in?
- How to make an meta_query optional?
- How to show only parents subpages of current page item in vertical menu?
- Limit the_excerpt with max of x characters
- How to use copy() function and paste file in /wp-content/themes directory
- PHP calling AJAX function that relies on passed PHP function values not working
- How can update custom meta for all posts
- wp_get_attachment_url filter won’t accept two arguments
- Translating add to cart woocommerce button [closed]
- Sanitize get_query_var() url parameters
- I think emoji are killing my WordPress site… How can I debug?
- WordPress Ajax Data problem
- nowplaying.include.php Will Not Display Results
- Am I not understanding plugins?
- Hiding a php element from mobile browsers
- Passing the page ID to a login php script
- PHP/MySQL issues when running WP on EC2 cloud [closed]
- SetCookie simply not working
- wrong php date()?
- How to safely remove the footer (twentytwenty)
- ajax_object is not defined when ajax calls the function
- Looking for most performant way to execute several similar WP queries within shortcodes
- It is a good idea to store values from the global $post if they are used multiple times?
- How do I fetch all comments per post via WP REST API?
- wp_insert_post not working
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Vagrantpress + composer
- esc_url returns incorrect URL
- Using More Tag in Combination with the_excerpt
- Add a custom stylesheet for BlackBerry
- Combine two filters into a single call
- combine Code 1 with Code 2
- How to output widget
- Recent posts with featured image or fallback image with permalink
- Custom Form Processing Issue
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- Reordering Buddy Press profile navigation [closed]
- What query string parameter is available for index.php, that works for both pages and blog articles?
- Sending data from custom inputs in WordPress comment form in the admin notification email
- export a csv file from the database with a cronjob
- How to set a min number of words for a blog post
- How to sanitize any integer input field in wordpress?
- How can I get the total number of installed importers?
- Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?
- MetaBox body is not showing (the callback function)
- wpdb php get_var query to get ID for URL image doesn’t work for ID over 999
- Change title only in dynamic page
- How to make products with no cost in WooCommerce
- Pass php dynamic variable to shortcode
- Insert term and child term from frontend