Skip to main content
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Source Link

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page one time and then afterwards we can easily set/unset that page as our front page anytime without any extra step.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?How to use a custom post type archive as front page?

If I adopt the above-mentioned solution, It'll work but if I decide to change my front page afterwards to something else I'll have to remove/disable this code, in addition. Whereas, in the case of WooCommerce, I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in the same way as WooCommerce allows us to set archive-product.php as home page (i.e. without extra step)?

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page one time and then afterwards we can easily set/unset that page as our front page anytime without any extra step.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?

If I adopt the above-mentioned solution, It'll work but if I decide to change my front page afterwards to something else I'll have to remove/disable this code, in addition. Whereas, in the case of WooCommerce, I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in the same way as WooCommerce allows us to set archive-product.php as home page (i.e. without extra step)?

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page one time and then afterwards we can easily set/unset that page as our front page anytime without any extra step.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?

If I adopt the above-mentioned solution, It'll work but if I decide to change my front page afterwards to something else I'll have to remove/disable this code, in addition. Whereas, in the case of WooCommerce, I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in the same way as WooCommerce allows us to set archive-product.php as home page (i.e. without extra step)?

deleted 3 characters in body
Source Link

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page one time and then afterwards we can easily set/unset that page as our front page anytime without any extra step.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?

If I adopt the above mentioned-mentioned solution, It'll work but if I decide to change my front page afterwards to something else II'll have to remove this code (or at least have to define a custom controller in customizer to enable/disable this functionality)code, in addition. WhearasWhereas, in the case of WooCommerce, I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in the same way as WooCommerce allows us to set archive-product.php as home page (i.e. without extra step)?

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page and then we can easily set that page as our front page.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?

If I adopt above mentioned solution, It'll work but if I decide to change my front page afterwards to something else I have to remove this code (or at least have to define a custom controller in customizer to enable/disable this functionality). Whearas, in case of WooCommerce I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in same way as WooCommerce allows to set archive-product.php as home page (i.e. without extra step)?

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page one time and then afterwards we can easily set/unset that page as our front page anytime without any extra step.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?

If I adopt the above-mentioned solution, It'll work but if I decide to change my front page afterwards to something else I'll have to remove/disable this code, in addition. Whereas, in the case of WooCommerce, I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in the same way as WooCommerce allows us to set archive-product.php as home page (i.e. without extra step)?

Source Link

How to set up Custom Post Type archive page as Front page

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I want to adopt the same approach as WooCommerce has adopted, it allows us to assign any static page to products archive page and then we can easily set that page as our front page.

I know there are some solutions floating around like this: How to use a custom post type archive as front page?

If I adopt above mentioned solution, It'll work but if I decide to change my front page afterwards to something else I have to remove this code (or at least have to define a custom controller in customizer to enable/disable this functionality). Whearas, in case of WooCommerce I don't need this extra step.

My question: How to set archive-portfolio.php as my front page in same way as WooCommerce allows to set archive-product.php as home page (i.e. without extra step)?