0

Im using this code to insert links into my blog:

        $linkdata = array(
             'link_name' => $title,
             'link_url' => $url,
             'link_catetory' => 3, // my cat id
             );

        $link_id = wp_insert_link( $linkdata ); 

Links are inserted, but not in the correct category, I missed something?

  • Set second parameter to true and see if it returns any WP errors – Mamaduka Mar 16 '12 at 22:05
1

I would guess link_catetory should be link_category. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.