PHP filter/hook for custom pages
-
I was wondering how I would be able to apply the PDF to be created for a custom page/URL of my choice. Instead of selecting “Post Types to Apply” and choosing one of my custom post types, is there a filter in which I can assign programmatically a page or block of PHP to use “?pdf=<post_id>”?
I have the custom post type “nonprofit” and I set Nonprofit as the “Post Types to Apply.” If I visit the link http://www.example.com/nonprofit/example-nonprofit/?pdf=123 I get the PDF. I want to create a custom post type template (https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post) that is a specific layout for just PDFs. So I could visit http://www.example.com/my-custom-page/?pdf=123.
Is there a filter, perhaps the dkpdf_query_args filter, that could allow me to use “?pdf=<post_id>” with my current template that’s not attached to a custom post type?
Thanks,
Harry
The topic ‘PHP filter/hook for custom pages’ is closed to new replies.