1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

create categories outside the wordpress admin panel

Discussion in 'WordPress' started by vicky1408, Oct 7, 2010.

  1. #1
    hi,

    I want to know how to create categories outside the admin panel.Don't suggest any plugin.wp_create_category(),Is this is the right function to create categories outside wordpress?if so,how and where to use it.
     
    vicky1408, Oct 7, 2010 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use the wp_create_category() function when you only need to specify the name and parent of the new category.
    The wp_insert_category() function is used when you also need to specify the ID, description, and nicename.
     
    Cash Nebula, Oct 7, 2010 IP
  3. vicky1408

    vicky1408 Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you,but when including wp_create_category() or wp_insert_category() in functions.php,it shows error.can u tell me how to include with an example?

     
    vicky1408, Oct 8, 2010 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cash Nebula, Oct 8, 2010 IP
  5. vicky1408

    vicky1408 Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ya saw the link,thanks.I didn't try it out though.will let you know how it works.
     
    vicky1408, Oct 9, 2010 IP