サポート » プラグイン » MW WP Formのコードが表示されない

  • 解決済 krgn

    (@kirig)


    現在の状況です。
    WP 4.9.8/MW WP Form 3.2.3

    ■index.php
    $the_query=new WP_Query(array(‘page_id’=>5));
    if($the_query->have_posts()):
    while($the_query->have_posts()):$the_query->the_post();
    $template=get_post_meta(get_the_ID(),’_wp_page_template’,true);
    $templates=str_replace(“.php”,””,$template);
    get_template_part($templates);
    endwhile;
    endif;
    wp_reset_postdata();

    ■get_template_partされてるテンプレート
    the_title();the_content();

    ■固定ページ(ID:5) 本文
    <div>[mwform_formkey key=”10″]</div>

    簡易にまとめると、MW WP Formのショートコードを含む記事をindex.php内で表示しようとしていて、
    get_template_partしているのですが、ショートコードがそのまま表示されてフォームが展開しません。
    index.phpに直書きすれば出てきましたが、テンプレートの枚数がかなり多いため避けたいです。

2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
  • トピック「MW WP Formのコードが表示されない」には新たに返信することはできません。