This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do not include the opening php tag if it is already included in your file. | |
add_action( 'wp', 'beans_child_setup_document' ); | |
function beans_child_setup_document() { | |
// Only apply to non-singular layouts. | |
if ( !is_singular() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => array( 'post' ), | |
'post_status' => array( 'publish' ), | |
'posts_per_page' => 100, // don't use -1, pick something reasonable | |
'no_found_rows' => true, // useful when pagination is not needed. | |
'update_post_meta_cache' => false, // useful when post meta will not be utilized. | |
'update_post_term_cache' => false, // useful when taxonomy terms will not be utilized. | |
// 'fields' => 'ids' // only good if all you need is ids |