All custom posts are not showing up

I have a custom post type which is called "scholarship". Archive page for custom post type is disabled. I am using category (Scholarships) which also has subcategories. I have used following code to include CPT in loop.

function add_custom_post_type_to_query( $query ) { if ( $query->is_home() || is_category() && $query->is_main_query() ) {     $query->set( 'post_type', array('post', 'scholarship') ); } } add_action( 'pre_get_posts', 'add_custom_post_type_to_query' ); 

When i use this code, 5 CPT are showing up. Total are 8. CPT in Scholarships-subcategories are not showing up and after putting this code my all menus disappear. I have main menu plus one custom menu in footer. If any one could help please.

Replay

Category: custom post types Time: 2016-07-30 Views: 2

Related post

  • All blog posts are not showing up 2013-08-21

    This post may already exists but I just missed it in how I searched for it. Here goes. I have recently changed my blog back to the Genesis Framework. I am using the Nameless child theme. These are my issues: The only way the front page shows up corre

  • Posts are not showing up on particular category 2014-04-07

    On my website, post are not showing up when I navigate to http://www.domain.com/category/category-name/ but on wordpress dashboard, I am able to see the actual number of post under that category. It is not getting displayed on website only. Also, whe

  • Sticky posts are not showing at the top of category posts 2014-07-16

    Can anyone tell me why sticky posts are not being displayed at the top of the following query: $wp_query = new WP_Query(array( 'post_type' => 'post', 'posts_per_page'=>10, 'category__in'=>array( 5,140,430 ) )); It was working fine until I added t

  • Custom field are not showing devise rails 2016-01-16

    <h2>Sign up</h2> <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> <%= devise_error_messages! %> <div class="field"> <%=f.label :name %></br> <%=f.text_field :

  • Custom Post type showing up in loop, regular posts are not showing up 2013-02-23

    Every one knows the basic WordPress loop, every one knows that if you want just posts in a loop you put query_posts("post_type=post"); BEFORE the loop. which I have done. The problem is I have a custom post type, called mini feeds, which shows u

  • Custom Post Type not showing anything added by code anymore? 2014-03-19

    So I have a piece of code written and it worked before, hasn't been edited hasn't been changed, no updates on the WP DB no updates on any plugin on WP and it's suddenly not working correctly. This is the code: $column1 = "member_name"; $column2

  • Why is Wordpress custom post type not showing in admin panel? 2013-11-07

    Every time I create a custom post type, the label never shows on the left admin panel, However, they do show when you click on manage post type.. Not sure what is going on. --------------Solutions------------- Please check what the value of the show_

  • Posts are not showing on front page after import 2015-02-06

    I've recently importet Wordpress content from an old site to a new one, which worked fine. The problem is that those importet posts aren't showing up. I fiddled around and notices, that I need to go into each post and just press Update without changi

  • Post are not showing up 2015-10-27

    The site I am working on is skinnnybantonmusic.com The Lastest News page is suppost to show the blog posts but for some reason none are showing up. (http://www.skinnybantonmusic.com/latest-news/) <?php get_header(); ?> <div id="main">

  • custom taxonomies are not showing up in get_taxonomies 2014-03-07

    I've made several taxonomies through the custom post type ui manager but i am not able to call them with get_taxonomies and my get_terms is not working either. Is there something I have to do after creating a custom taxonomy in order to get it fully

  • All my partitions are not show after installing ubuntu 14.4 2014-05-08

    This question already has an answer here: How do I recover my accidentally lost Windows partitions after installing Ubuntu? 3 answers I had windows 8.1 installed in my system and I had 3 partitions in it.I installed Ubuntu 14.4 with replace windows 8

  • NewsFeed Posts are not showing 2015-07-21

    Newsfeed Postswere working before but when I post anything and click on "Following" link my Post gets disappeared. My posts are visible in Activity tab but they are not visible on Following tab. I tried to stop/Start/remove/add Distributed cache

  • Archive of custom post type not showing 2015-11-24

    I have a parent theme and a child theme (spacious). I have made a custom post type called "job-openings". a single page (using single-job-openings.php in the child theme folder) - which works fine, at www.domain.com/job-openings/test-job-opp/ bu

  • Custom post type not showing in wp_posts table in database using navicat or PHPmyadmin 2015-03-26

    This is really weird. I created a custom post type and saved a few posts using it. Then I managed to edit and update them. When I came to look in the database for the rows I cant find them. I used naviacat and PHPmyadmin to check the tables but both

  • Custom Post Types Not Showing Up In query_posts Result 2011-06-02

    This query works in some places, but not in others... right now it's not working on the home page. This query is in a file that is included into index.php of my theme. The regular posts show, but no cutom post types. What's wrong with this query? $ar

  • Custom wallpapers are not showing when selected 2013-09-26

    I've added three custom wallpapers to the /usr/share/backgrounds/ folder using the following Terminal method - sudo cp /home/master/Downloades/company-wallpaper-1.jpg /usr/share/backgrounds/ However, when I right click on the desktop, select Change D

  • My posts are not showing up in my friends news feed on Facebook. Why? 2015-01-19

    All the configuration is correct to "friends", now I don't know if is there is a setting for what gets published in friends feed? as far as I know everything you publish/posts always show up in the feed carrousel.

  • Filter Ajax Dynamic Archives Custom Posts Always not Showing Correct Result 2016-07-18

    Hy everyones, I'm building filter search using multi select option, when I'm selecting the country and then result of filter search always show all posts Here is my template <div class="row"> <div class="col-md-8 col-md-offset-2&qu

  • Github pages hosted jekyll blog post loop not showing but pages are working 2016-02-12

    I created a jekyll blog on my computer and it's working pretty fine on localhost:4000. and then I created a github pages repo like username.github.io. then I uploaded my local jekyll site using github windows client. after all file syncked I reloaded

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 2.316 (s). 13 q(s)