Using Ajax and WP_Query to load more posts on category page fails
Using Ajax and WP_Query to load more posts on category page fails
Using Ajax and WP_Query to load more posts on category page fails
have to do a while have post to show for two custom post types sharing the same taxonomy?
WordPress gives you a few options on the Dashboard when you delete a user. As far as I am aware the options are: Delete the user but keep their name / credit on created content Delete the user and attribute their content to another user Delete the user AND delete their content Unless there were … Read more
Manipulated offset and pagination, can’t display last post anymore
WordPress rewrite with custom parameter doesn’t work
The problem is get_page_by_title, it defaults to post type page so you will need to tell it to target the correct post_type. Going by your post type sessions, this is what you need. get_page_by_title(‘Duck’, OBJECT, ‘sessions’); The second argument is the type of output, the default is OBJECT so thats what I used as well
I found the problem, thanks to @vancoder for the tip! I have pre_get_posts attached to a function for alphabetizing product posts, which was causing everything else to be out of whack. It should have been targeting only products! /*************************************************************** * Change Archive sorting * https://codex.wordpress.org/Alphabetizing_Posts ***************************************************************/ function course_dir_sort_order( $query ) { if ( $query->is_archive(‘products’) ) … Read more
It seems that the following code is at fault: $query_args[‘tax_query’] = array( array( ‘taxonomy’ => ‘edd_log_type’, ‘field’ => ‘slug’, ‘terms’ => ‘file_download’, ) ); It seems to be combining the tax_query args with those from the search query itself, by removing this I am getting a better result, although it is counting ALL logs, not … Read more
Query custom post type that has a serialized relational advanced custom field value
WP Query: If field X is empty, show posts based on field Y