YOAST SEO won't work on custom post type archive

Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

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. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

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.

Share Improve this question edited Aug 2, 2019 at 12:10 relos100 asked Aug 2, 2019 at 11:43 relos100relos100 114 bronze badges 2
  • What does your archive template look like? – Jacob Peattie Commented Aug 2, 2019 at 13:02
  • It's okay. I solved it. And I leaved comment how I done this. Thanks anyway :) – relos100 Commented Aug 5, 2019 at 13:33
Add a comment  | 

1 Answer 1

Reset to default 1

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745268081a4619579.html

相关推荐

  • YOAST SEO won&#39;t work on custom post type archive

    Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress.

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信