Use “archive” as slug for custom post type
Use “archive” as slug for custom post type
Use “archive” as slug for custom post type
How to conditionally check for author archive when is_author() fails to work because the author has no posts
Custom post type archive page thinks I’m not logged in
Having a problem with Next and Previous Links
Filter custom taxonomy archive posts by 2nd custom taxonomy using select dropdown
I got it! For any one in the future with the same problem: ACF’s get_field_object() apparently makes a WP_Query and doesn’t clean up after so, since I called it for every post, I always got the same post after a certain point in the elaboration. I found the solution in this question. Some code for … Read more
These things are fun because there are so many possibilities. I’ll start my series of answers here and you can accept it once we get it right. First thing, your site is allowing directory listings — this is bad for security — but at the moment is helping me see what might be causing the … Read more
There is no logical explanation why if( is_post_type_archive(‘news) && is_date()) should fail and not work in your situation. is_date() return true on all date archives is_post_type_archive( ‘news’ ) will return true on post type archives When you visit localhost/2016/02/?post_type=news, both of those ring true, and they will only ring true on that specific URL If … Read more
Yearly Archive for Categories with dropdown
The is_category function checks the queried object. Since this is in pre_get_posts, the query has not happened yet. Check the other parameters to find if the query is going to be for cat 5, not if the results are for cat 5. Try ->get(‘cat’).