Support » Plugins » for each $post???? cache data for each post daily

Viewing 1 replies (of 1 total)
  • okay, i think ive figured some of it out, but now have another problem. first heres the code i am using to get it working (sort of)

    function seop_update_page_stats(){
    global $post;
    $args = array( 'post_type' => 'page' );
    $myposts = get_posts($args);
    foreach( $myposts as $post ) {
    $id = $post->ID;
    $result = stuff i do to get the data
    update_post_meta($id, 'seop_stats', $result);

    so this code sort of works (i also have the same function for the “posts” page type), i can set this up to run off the wordpress cron.

    problem is this only seems to do some of the posts. i dont this as a timeout either as it doing some old post, and some new ones, but it doesnt seem to update all posts.

    has anyone every had anything similar?

Viewing 1 replies (of 1 total)
  • The topic ‘for each $post???? cache data for each post daily’ is closed to new replies.