お世話になります。
表題についてなのですが、ある固定ページ(Aとします)にショートコードが貼り付けられており、別の固定ページ(B)でAの内容を取得し出力すると、Aに書かれたショートコードが無効になってしまいます。
=== A(投稿画面) ===
[test]
=== B(投稿画面) ===
[require_A]
=== functions.php ===
function test_A_func(){
return '展開成功!';
}
add_shortcode('test', 'test_A_func');
function test_B_func(){
$aaa = get_page_by_title('A');
echo $aaa->post_content;
}
add_shortcode('require_A', 'test_B_func');
=== B.php ===
if(have_posts()): while(have_post()): the_post();
the_content();
endwhile; endif;
=== 出力内容 ===
[test]
原因と解決策がわかる方、ご教授お願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。