I need make all of my posts update. I use bulk upload for store, but in web page posts/products dont show, when i hit update, posts/products are showed up.
I think
Here you go, you just loop through the posts with a foreach.
/*
Plugin Name: Example
Description: This is not just a plugin, it's <em>CODE</em>..
Author:
*/
add_action('init','example_hide');
function example_hide(){
$my_posts = get_posts( array('post_type' => 'post', 'numberposts' => 10 ) );
foreach ( $my_posts as $my_post ):
$my_post['post_content'] = 'This is the updated content.';
wp_update_post( $my_post );
endforeach;
}
You should be able to use WordPress' get_posts function. Try:
$all_posts = get_posts('numberposts=');