最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom post types - Finding the CPT archive template source

programmeradmin1浏览0评论

I've created a CPT named kindergarten by a plugin ;
I was able to see the archive page of this custom post type with its posts;
When I was using Elementor for changing the template of this post type, I don't know what happened that I see a message that there is no posts for that; like this:

I've created a archive-kindergarten.php for test, But I don't see any change.
How can I find what is the source for this CPT template?
How can I force Wordpress to use elementor template as an archive template for this post type? (I have to mention that posts work perfectly but archive page doesn't )

I've created a CPT named kindergarten by a plugin ;
I was able to see the archive page of this custom post type with its posts;
When I was using Elementor for changing the template of this post type, I don't know what happened that I see a message that there is no posts for that; like this:

I've created a archive-kindergarten.php for test, But I don't see any change.
How can I find what is the source for this CPT template?
How can I force Wordpress to use elementor template as an archive template for this post type? (I have to mention that posts work perfectly but archive page doesn't )

Share Improve this question asked Nov 28, 2020 at 10:08 Sarah JasonSarah Jason 1
Add a comment  | 

1 Answer 1

Reset to default 0

I dont know if it is what is being ask, but possibly it is.

if we add the woocommerce theme support on function.php like so

add_theme_support( 'woocommerce' );

we can copy the archive-product.php from the woocommerce plugin to our theme, than we can edit and use that file, the archive-product.php set the page that show the products by category that has a loop to each individual product, and each product presented is set on the page content-product.php, that can also be copied to our theme and edit at our wish, this way even if woocommerce gets an update we are fine. However this should be made in a child_theme, because if the theme gets updated can override this files or even who knows delete them.

It's possible also to create a template and use it on a page.

发布评论

评论列表(0)

  1. 暂无评论