Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 down vote accepted

I would guess link_catetory should be link_category. :)

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

Your Answer

 
discard

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.