我需要在Access-Control-Allow-Origin: *
我的模板文件之一中添加标头。我要怎么做,我希望它仅用于此特定模板,以使其不在整个站点范围内使用,
我认为您正在寻找is_page_template();
<?php
if(is_page_template('your-page-template.php')) { //Change this to the path to your wordpress template
//Add your code here...
} ?>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句