I created my custom post type page (archive-objects.php). This page works fine, I have been created page for it and attributed template to it. So everything is okay. But something wrong is with YOAST SEO. This page title, img and other iformation taking from not this page info, but from first looped post in this archive. In my custom post type I done public -> true and has_archive -> true. What problem can this be? Thank you.

closed as off-topic by Max Yudin, Nathan Johnson, fuxia Aug 16 at 12:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • What does your archive template look like? – Jacob Peattie Aug 2 at 13:02
  • It's okay. I solved it. And I leaved comment how I done this. Thanks anyway :) – relos100 Aug 5 at 13:33

I just find out what I was missing at the top, after get_header();.

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

and at the bottom, just before get_footer();

<?php endwhile; ?> <?php endif; ?>

So I just figured out that I was not loading archive properly, so I don't get all his information.

Not the answer you're looking for? Browse other questions tagged or ask your own question.