I'm sorry if my question may seem strange, but I've only recently started fiddling with WordPress development, as I was given a project already largely developed (I'm not saying it was well developed ;-) ).

The previous developer registered several post types, and assigned custom fields to each post type. For instance, there is a "news" post type, whose "section" custom field can be "updates" or "press review". However, this was left behind, and only a archive-news.php and a single-news.php scripts have been written to present the list of "updates" and the single "update".

Now I need to keep the current contents of the existing pages, but I have to make a new page listing the "news" posts with section set to "press review". I think I've got how to query and how to present the posts, but what I'm missing is how can I point to the new "archive-pressreview.php" page. From what I got, it would be easy to do if "press review" was a post type, but it's not, and I cannot change it.

How could I get a permalink to my custom archive page?

Thanks in advance!

1 Answer 1


WordPress does not support a template file which queries custom fields. You can reference the template file hierarchy.

One option would be to make a page for the news archive and a custom page for the press review archive. From these pages you could make custom template files to override the page:


These pages could leverage the query code you've already written. Unfortunately the default template tags to link to these pages won't work but you can link directly to these individual pages.

It's a little bit of a hack but it'll get you there.

  • Thanks @infamouse - it's definitely not a solution, but it may be the hack I need.
    – Simone
    Commented Jun 17, 2014 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.