Wordpress custom post type as homepage with homepage url

admin2025-01-08  3

I was able to set a custom post type as the homepage for a woocommerce site I am building.

The problem is that when I do this, the homepage url does not display. (i.e. ).

Instead it displays as ().

Using filters I was able to get rid of the post slug, but the name is still now present when set to the homepage. If I go to () the url bar displays ().

Does anyone know how I can get rid of post-name in the URL when setting this as the homepage?

I was able to set a custom post type as the homepage for a woocommerce site I am building.

The problem is that when I do this, the homepage url does not display. (i.e. https://mywebsite.com).

Instead it displays as (https://mywebsite.com/post-type/post-name).

Using filters I was able to get rid of the post slug, but the name is still now present when set to the homepage. If I go to (https://mywebsite.com) the url bar displays (https://mywebsite.com/post-name).

Does anyone know how I can get rid of post-name in the URL when setting this as the homepage?

Share Improve this question asked Sep 1, 2020 at 17:35 Nicholas FinchNicholas Finch 1211 bronze badge 2
  • 2 Does this answer your question? How do you use a CPT as the default home page? – Michelle Commented Sep 1, 2020 at 19:31
  • You can find the answer to this question here: wordpress.stackexchange.com/a/18070/16 – Michelle Commented Sep 1, 2020 at 19:32
Add a comment  | 

1 Answer 1

Reset to default 0

Sounds like you either need to set your index.php to display your hooks for that post type. Or you need to change your home page setup in the customizer. Here is a link on how to do that.

https://wordpress.com/support/pages/front-page/

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736267594a1208.html

最新回复(0)