title: Add custom php logic file to Wordpress
body: <p>I'm looking for a simple solution to add a custom php file and route to a Wordpress website. </p>
  
  <p>Let's say I have a page with a simple form. I want submit that form through ajax and handle the form submission myself in a custom php file. Basically I just want to create a simple route where I can put all the logic and output a json in return.</p>
  
  <p>Wordpress is kinda new to me, I was wondering, what's the best way to achieve that ?</p>
  
  <p><strong>edit:</strong></p>
  
  <p>I would like to add an url like <a href="http://mywebsi.te/validate" rel="nofollow">http://mywebsi.te/validate</a> that redirect to validate.php and output a json file from there.</p>