2012-05-12 9 views
0

新しいカスタム投稿タイプを作成した後、私のホームページに表示されないnav_menuの小さな問題があります。Wordpress:nav_menuがホームページに表示されない

これは、あなたが、私は本当に感謝してよ私を助けることができる場合、私は私のfunctions.php

add_action('init', 'create_companies_type'); 
    function create_companies_type(){ 
    register_post_type('information', array(
    'label' => __('Nos informations'), 
    'singular_label' => __('information'), 
    'public' => true, 
    'show_ui' => true, 
    'capability_type' => 'post', 
    'hierarchical' => false, 
    'supports' => array('title', 'author', 'thumbnail','editor','custom-fields'), 
    )); 
} 

add_filter('pre_get_posts', 'my_get_posts'); 

    function my_get_posts($query) { 
    if (is_home()) 
    $query->set('post_type', array('information','post')); 

    return $query; 
} 

に入れてコードがあります。 ありがとう

答えて

0

あなたがカスタムメニュー領域に表示されているポストタイプについて話しているなら、そこにあります。私はちょうどあなたが意味するものを推測しています。

+0

お返事ありがとうございました!それは私の問題ではありません。 私の問題は、私のデフォルトメニューがホームページに表示されないということです –

関連する問題