私はWordPressでmy_custom_function
後に追加しようとしていますthe_content
add_filter ('the_content', 'my_custom_function');
add_action ('the_content', 'my_custom_function'); // I tried both
私のmy_custom_function
機能はこんな感じです
function my_custom_function($content) {
if(is_single()) {
$content .= "this is custom function content";
$content .= my_another_custom_function();
$content .= "this is custom function content";
}
return $content;
}
私の問題は、このコードがmy_another_custom_function()
前に 追加されていることですが、コンテンツの後the_content
に追加したいです。
コードに示されている他の2行$content .= "this is custom function content";
はテスト用であり、これらは後に表示されます the_content
誰かがそれを修正する方法と私が間違っていることについて私に何か考えを教えてもらえますか...