Support

Account

Home Forums General Issues Problem with Dokumentation-code 'Querying the database' Reply To: Problem with Dokumentation-code 'Querying the database'

  • Hi @davelee

    Within the loop of $rows, you could find out the status of the post like so:

    
    <?php 
    
    // loop through the results
    if( $rows )
    {
    	foreach( $rows as $row )
    	{
    		if( get_post_status($row->post_id) != 'publish' )
    		{
    			continue;
    		}
    		
    		// run code here
    
    	}
    }
    
    ?>
    

    Hope that helps.

    Thanks
    E