• carcar013

    (@carcar013)


    Hello,

    I have two post under a category and for some reason they are not showing on the page. I have other categpory pages and they are all working ok except for this one.

    How can I get the posts in this category to show?

    Thanks,
    Carlie

Viewing 1 replies (of 1 total)
  • Subrata Sarkar

    (@subrataemfluence)

    Hi Carlie,
    Are the posts in question Published? If you are OK with WP_Query you can try this:

    
    $query = new WP_Query(array(
        'post_type' => 'travelog',
        'paged' => $currentPage,
        'posts_per_page' => 3,
        'orderby' => 'date',
        'order' => 'DESC',
        'post_status' => array('publish','future','pending')
    ));
    
    

    The major post_status-es WP handles are:

    
    'publish' - a published post or page
    'pending' - post is pending review
    'draft' - a post in draft status
    'auto-draft' - a newly created post, with no content
    'future' - a post to publish in the future
    'private' - not visible to users who are not logged in
    'inherit' - a revision. see get_children.
    'trash' - post is in trashbin.
    

    Your posts should fall in any of the above statuses.

Viewing 1 replies (of 1 total)
  • The topic ‘Post not showing under category’ is closed to new replies.