0

I've to do some edits to wordPress theme home page . This is the scenario.

There are 4 posts being showed in home page under news tab now when i check this is using front-page template and in front-page template I've something like this

<?php
    wp_reset_query();
    $loop = new WP_Query(  array( 'post_type' => 'news', 'posts_per_page' => 4 , 'orderby ' => 'date' , 'order' => 'DESC' )  );
           // $loop = new WP_Query( $args );
      while ( $loop->have_posts() ) : $loop->the_post();

Now when i try to find out post type for news i dont find it .so if there is no custom post type for this what could be other option for this? please someone help me with it how can i figure this out .

4
  • change news in above code with your custom post type name.
    – Robert hue
    Oct 16, 2015 at 9:28
  • @Roberthue if there is no tab for news section in dashboard then how do i trace from where this content is being generated ?
    – Sikander
    Oct 16, 2015 at 9:33
  • type the following into your url box: domain.com/wp-admin/edit.php?post_type=news The most common reason for a post type not being shown is that it's been given the same "place" as another CPT (usually a plugin) so it's not shown, turn off all plugins to see if it comes back, if it does then find the code for the cpt and change it's "menu_position" in the register_post_type code. Oct 16, 2015 at 9:41
  • invalid post type , means does not exist
    – Sikander
    Oct 16, 2015 at 9:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.