您好,
我想删除插件添加到wp\\u head的操作,但仅在某些情况下。
以下是不起作用的代码:
if (is_single() && get_post_type() == \'tenant\') {
$row = $wpdb->get_row("SELECT * FROM Events WHERE WP_ID=\'$post->ID\'",ARRAY_A);
remove_action(\'wp-head\',array($aiosp, \'wp_head\'));
$seo_head = "<title>" . $row[\'Event\'] . " | " . $row[\'Town\'] .
" | Events in ". $row[\'Country\'] . "</title>";
}