Force Custom Template Selection


/ Published in: PHP
Save to your folder(s)

Place into fucntions.php


Copy this code and paste it in your HTML
  1. /******* FORCE CUSTOM TEMPLATE SELECTION *********/
  2.  
  3. function my_template_redirect()
  4. {
  5. global $wp;
  6. if ($wp->query_vars["taxonomy"] == "clinic")
  7. {
  8. include(TEMPLATEPATH . "/taxonomy-clinic.php");
  9. die();
  10. }
  11. }
  12. add_action("template_redirect", 'my_template_redirect');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.