Global variable $post returning incorrect object
Why is test-product-magazine, instead of the correct, shop? The global $post object is not a reliable way to determine anything about archive pages because the object will typically be the first post of the main query when outside the loop. Since the main query is for the posts in the archive and not the archive … Read more