サポート » 使い方全般 » カスタム投稿記事の 個別記事ページ

  • WordPress 4.0.5

    現在 トップページに日本語版に

    カスタム投稿記事を掲載
    <?php query_posts(‘post_type=topics&posts_per_page=5’); ?>
    <?php if(have_posts()): while(have_posts()): the_post(); ?>
    <?php get_template_part(‘content’,’title’); ?>
    <?php endwhile; endif; ?>

    固定ページに英語版のトップページ

    カスタム投稿記事を掲載
    <?php query_posts(‘post_type=news&posts_per_page=5’); ?>
    <?php if(have_posts()): while(have_posts()):
    the_post(); ?>
    <?php get_template_part(‘content’,’title’); ?>
    <?php endwhile; endif; ?>

    それぞれ別のレイアウトでテンプレート
    を変えています。

    ところが英語版のカスタム投稿記事の
    個別記事ページが、日本語版のレイアウト
    になってしまいます。
    これを英語版にできないでしょうか?

    functions.php

    //ニュース記事の投稿タイプ
    register_post_type(
    ‘topics’,
    array(
    ‘label’ => ‘新着情報’,
    ‘hierarchical’ => false,
    ‘public’ => true,
    ‘has_archive’ => true,
    ‘supports’ => array(
    ‘title’,
    ‘editor’
    )
    )
    );

    //ニュース記事の投稿タイプ
    register_post_type(
    ‘news’,
    array(
    ‘label’ => ‘英語版ニュース’,
    ‘hierarchical’ => false,
    ‘public’ => true,
    ‘has_archive’ => true,
    ‘supports’ => array(
    ‘title’,
    ‘editor’
    )
    )
    );

2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
  • トピック「カスタム投稿記事の 個別記事ページ」には新たに返信することはできません。