Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Custom post type won't show on the home page, but it should….

  • Hi,
    I have created a new custom post type (foto) with type but it is not showing on the home page, while other custom posts do.

    That is my code, the other custom posts were created with post types plugin and they show up

    $args= array('orderby' => 'id', 'order' => 'DESC', 'posts_per_page'=>12, 'category_name'=>'gli-approfondimenti-della-settimana', 'post_type' => array('post','interviste','opinioni','fotostorie','foto','post__not_in' => $top_id));
    $the_query = new WP_Query( $args );

    Any idea?


Viewing 1 replies (of 1 total)
  • Hi Paologanino,

    Please confirm it is working with following code.

    $args = array( 'post_type' => 'foto', 'posts_per_page' => 10 );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    	echo '<div class="entry-content">';
    	echo '</div>';

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    [ Signature moderated. ]

Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type won't show on the home page, but it should….’ is closed to new replies.