Skip to content

Instantly share code, notes, and snippets.

@hunk
Created November 29, 2009 00:40

Revisions

  1. hunk revised this gist Nov 30, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    $category_id = 11; // ID of the category
    $write_panel_id = 5; // ID of the Write Panel

    $add = new WP_Query('posts_per_page=-1&cat='.$category_id);
    $add = new WP_Query('cat='.$category_id);
    if ($add->have_posts()) : while ($add->have_posts()) : $add->the_post();
    update_post_meta($post->ID, "_mf_write_panel_id", $write_panel_id);
    endwhile; endif;
  2. hunk revised this gist Nov 30, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    $category_id = 11; // ID of the category
    $write_panel_id = 5; // ID of the Write Panel

    $add = new WP_Query('&posts_per_page=-1&cat='.$category_id);
    $add = new WP_Query('posts_per_page=-1&cat='.$category_id);
    if ($add->have_posts()) : while ($add->have_posts()) : $add->the_post();
    update_post_meta($post->ID, "_mf_write_panel_id", $write_panel_id);
    endwhile; endif;
  3. hunk revised this gist Nov 30, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    $category_id = 11; // ID of the category
    $write_panel_id = 5; // ID of the Write Panel

    $add = new WP_Query('cat='.$category_id);
    $add = new WP_Query('&posts_per_page=-1&cat='.$category_id);
    if ($add->have_posts()) : while ($add->have_posts()) : $add->the_post();
    update_post_meta($post->ID, "_mf_write_panel_id", $write_panel_id);
    endwhile; endif;
  4. hunk created this gist Nov 29, 2009.
    13 changes: 13 additions & 0 deletions gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <?php
    include('wp-config.php');
    include('wp-load.php');
    global $wpdb;

    $category_id = 11; // ID of the category
    $write_panel_id = 5; // ID of the Write Panel

    $add = new WP_Query('cat='.$category_id);
    if ($add->have_posts()) : while ($add->have_posts()) : $add->the_post();
    update_post_meta($post->ID, "_mf_write_panel_id", $write_panel_id);
    endwhile; endif;
    ?>