Blog 2

[do_widget id=psac-post-scrolling-widget-3]
‚post‘,

// Query performance optimization.
‚fields‘ => ‚ids‘,
’no_found_rows‘ => true,
‚posts_per_page‘ => -1,
‚meta_query‘ => array(
array(
‚key‘ => ‚my-meta-key‘,
‚value‘ => ‚my-meta-value‘,
),
)
);

$query = new WP_Query( $query_args );

if ( $query->posts ) {
foreach ( $query->posts as $key => $post_id ) {
// var_dump( $post_id );
// Code goes here..
}
}
}
add_action( ‚admin_head‘, ‚prefix_search_post_by_post_meta_value‘ );
endif;