• So as the title says i Screwed up and i did it bad

    so i made a plugin witch would create pages for me

    for example i set it to create

    Sitemap
    Privacy Policy
    Terms and conditions
    Earnings disclaimer

    and it worked great atleast i tuath well it make more then one page so now my blogs got over 20 pages of the same page some of them evern got more (running a network with only my blogs)

    So is there away to remove them without having to go into every blog and do it by hand ?

    the code i used was

    if ($sitemap == null) {
            $sitemap = array(
                'post_title' => 'Sitemap',
                'post_content' => '',
                'post_status' => 'publish',
                'post_author' => 1,
                'post_type' => 'page'
            );
            $id = wp_insert_post($sitemap);
            if ($id > 0 && !($id instanceof WP_Error)) {
                update_post_meta($id, '_wp_page_template', 'page-sitemap.php');
            }
        }

    shouldent i be able to just change the ” wp_insert_post ” to “wp_delete_post ” ?

  • The topic ‘Screwed up bad :(’ is closed to new replies.