Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1360718

    Hi Gunter,

    To display private posts in masonry you need to edit core files and change the hide_empty values to false. Can you add a button on the backend to allow a private post or a hook for functions.php instead please? It seems all your code is basically there already:

    Line 372 class-avia-masonry.php
    
    	protected function sort_buttons()
    		{
    
    			$term_args = array(
    								'taxonomy'		=> $this->config['taxonomy'],
    								'hide_empty'	=> false
    							);
    
    			/**
    			 * To display private posts you need to set 'hide_empty' to false,
    
    Line 1288
    
    		$term_args = array(
    								'taxonomy'		=> $params['taxonomy'],
    								'hide_empty'	=> false
    							);
    				/**
    				 * To display private posts you need to set 'hide_empty' to false,

    Thanks for considering

    Regards,

    Tim

    #1360750

    Hey Tim,

    Thank you for the inquiry.

    Not sure how the modification above affects the private posts but setting the hide_empty parameter to false will only force empty categories to display in the av-sort-by-term container. This is where the category sort buttons are located.

    // https://developer.wordpress.org/reference/functions/get_terms/

    To display private posts, you may need to adjust the post_status parameter in the masonry query.

    // https://developer.wordpress.org/reference/classes/wp_query/#status-parameters

    You can use the avia_masonry_entries_query filter for this.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Private posts in Masonry’ is closed to new replies.