WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Set second parameter to true and see if it returns any WP errors – Mamaduka Mar 16 '12 at 22:05
up vote 1 down vote accepted

I would guess link_catetory should be link_category. :)

share|improve this answer
oooh the shame!, thank you for this – greenbandit Mar 16 '12 at 22:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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