2

I would like to add a link in the WYSIWYG editor to the archive page for a custom post type.

I have a custom post type case-studies and would like to add a link to the archive page in the tinyMCE WYSIWYG editor.

In the link suggestions, I can see the individual posts but not the archive page.

Screenshot of insert link dialogue

I know that I could manually add the url but would like to know if it is possible to add the archive to the list of suggestions.

EDIT: I am using archive-{post-type}.php. The archive page displays fine. I would just like to be able to lik to it

2
  • Have you created the page for Case Study list or you just use archive-case_studies.php or archive.php template?
    – Max Yudin
    Commented Feb 6, 2018 at 14:07
  • 3
    I recall looking into this for someone else, either here or on the .org forums, and basically came to the conclusion that it's not possible. They were looking to add taxonomy terms. If I remember correctly this list is populated with posts only as it's backed by a WP_Query call. The problem with filtering the results was that the front-end expected posts, so you couldn't put a term or anything else in the results because they wouldn't be able to be rendered. Commented Feb 6, 2018 at 14:12

0

Your Answer

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