我不想使用任何现有的插件。对于无WordPress项目,我将在href
<a href="FileOnMySite.php">Click here</a>
FileOnMySite.php
会像header(\'Location: http://www.MyaffiliateLink.com\')
但我一定会header already sent
在WordPress中。有没有可能避免header already sent
?
我不想使用任何现有的插件。对于无WordPress项目,我将在href
<a href="FileOnMySite.php">Click here</a>
FileOnMySite.php
会像header(\'Location: http://www.MyaffiliateLink.com\')
但我一定会header already sent
在WordPress中。有没有可能避免header already sent
?
我不明白为什么同样的方法在WordPress网站上仍然不起作用。如果您特别指定要链接到的文件是服务器上可用的有效PHP文件,那么它仍然会命中该文件,而不是命中WordPress。如果您对此工作有问题,请确保没有任何重写规则干扰您的。htaccess文件。
add_action(\'wp_head\',\'add_gpp_gallery\'); function add_gpp_gallery() { if( ( is_single() || is_page() ) && ( !is_page_template(\'page-blog.php\') ) ){ remove_shortcode(\'gallery\', \'gallery_shortcode\'); add