1

I have a wordpress site, which has a front-page.php rendering a custom front page, so that this template will show no matter if WP admin settings is set to static page or show posts. The default setting is show posts in WP, so how can I get the 'post' post type archive slug, so my archive.php template can render a list of all posts no matter the WP setting?
----
With my custom post type 'event' - I can get the archive template from mysite.com/event (slug is set to 'event'). I want to do the same with the 'post' post type - so i can get target the archive template with for instance mysite.com/blog

  • I don't get what you mean - archive.php shows your selected archive, for example Posts from January 2015. And the slug for the post type Post is post. Perhaps you could clarify your question to help us (me) understand? – David Gard Feb 12 '15 at 11:12
  • @DavidGard of course. Ive updated my question, which i hope clarifies it a little :) – Mac Luc Feb 12 '15 at 11:39
  • If the slug is post, shouldnt mysite.com/post show my post archive template? – Mac Luc Feb 12 '15 at 11:41
  • Please make sure you post all relevent info in your question so that we don't waste our time posting irrelevant info. Thank you – Pieter Goosen Feb 12 '15 at 12:32
  • @PieterGoosen You are right. I thought there was a more straight forward answer for this that I didnt know about. My bad. – Mac Luc Feb 12 '15 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.