How to specify a function on a link <p>I am new to WordPress development. I am coming from Symfony and vanilla PHP development.</p> <p>I want to assign a "route" or a function to generate an XML file for a specific post type.</p> <p>I know that I can get the post information with WordPress functions like <code>get_post_meta</code>.</p> <p>I don't know the how to assign a function to a link</p> <p><code>&lt;a href="&lt;what to do here&gt;"&gt;DOWNLOAD XML&lt;/a&gt;</code>.</p> <p>What is the "WordPress way" to do this?</p>