フォーラムへの返信

3件の返信を表示中 - 1 - 3件目 (全3件中)
  • フォーラム: 使い方全般
    返信が含まれるトピック: 投稿の子カテゴリを親カテゴリごとに表示
    トピック投稿者 tatsurou0102

    (@tatsurou0102)

    ご教授ありがとうございます。
    無事解決いたしました。

    フォーラム: 使い方全般
    返信が含まれるトピック: カスタム投稿、特定カテゴリ一覧表示について
    トピック投稿者 tatsurou0102

    (@tatsurou0102)

    ishitakaさん
    ご返答ありがとうございます。

    無事意図した表示になりました!
    ご教授いただきありがとうございました。

    フォーラム: 使い方全般
    返信が含まれるトピック: カスタム投稿、特定カテゴリ一覧表示について
    トピック投稿者 tatsurou0102

    (@tatsurou0102)

    ishitakaさん
    ご返答ありがとうございます。

    以下のようにコードに入力したのですが、うまく表示されません。。。

    <?php
    $args = array(
        'post_type' => 'cast',
        'posts_per_page' => -1,
        'order' => 'DESC',
        'tax_query' => array(
          array(
            'taxonomy' => 'work_store',
            'terms' => array('$post->post_name'),
            'field' => 'slug'
          ),
        ),
      );
    $new_query = new WP_Query($args);
    ?>
    <?php if ($new_query->have_posts()) : ?>
    <?php
    $args = array(
        'post_type' => 'cast',
        'posts_per_page' => -1,
        'order' => 'DESC',
        'tax_query' => array(
          array(
            'taxonomy' => 'work_store',
            'terms' => array('get_post_field( 'post_name', get_post() )'),
            'field' => 'slug'
          ),
        ),
      );
    $new_query = new WP_Query($args);
    ?>
    <?php if ($new_query->have_posts()) : ?>

    恐縮なのですが、具体的なコードをご教授いただけないでしょうか。
    よろしくお願い致します。

3件の返信を表示中 - 1 - 3件目 (全3件中)