Home Forums Air WordPress Theme Hiding drafts from the 'Show more' project button

This topic contains 2 replies, has 2 voices, and was last updated by  Marilize 7 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18150

    Marilize
    Participant
    Purchased

    Hello,

    At the end of a gallery post there is a ‘+’ to show additional projects.
    When I click on this projects that are Drafts as well as projects that are set on Private show?

    Is there any way to ensure these projects don’t show?

    #18155

    SeaTheme
    Keymaster
    Purchased
    Supported

    Hi,

    It will be fixed in the next update. The quick fixing solution:

    Find(Apearance>Theme Editor) /functions/interface/interface-ajax.php
    Add 'post_status' => 'publish', under line 58:

    The whole WP_Query should be:

    $the_query = new WP_Query(array(
    			'posts_per_page' => $per_page,
    			'paged' => $paged,
    			'category__in' => $category,
    			'post_status' => 'publish',
    			'tax_query' => array(
    				array(
    					'taxonomy' => 'post_format',
    					'field' => 'slug',
    					'terms' => array('post-format-gallery')
    				)
    			)
    		));

    Regards!
    Bwsm – uiueux.comTwitterFacebook

    #18162

    Marilize
    Participant
    Purchased

    Thank you so much! You’re amazing.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Join Newsletter(FREE)

Subscribe to our newsletter to receive news & updates. We promise to not spam you, super promise!