Support » Themes and Templates » Inserting links/bookmarks programmatically via function?

  • I’m trying to code a script to set up programmatically various features of a new site including widgets, posts, pages and links. Most of this is working fine using add_option() and wp_insert_post() etc but I can’t find anything in the Function reference like wp_insert_post() to enable programmatic creation or updating of bookmarks?

    Is there a way to programmatically:

    1. Insert a new bookmark, specifying name, URL, description etc
    2. Manage link categories, i.e. rename, delete or create new categories?

    thanks v much
    Steph

Viewing 1 replies (of 1 total)
  • Ah, it looks like you can access the internal admin functions for link manipulation including wp_insert_link() by including wp-admin/includes/bookmark.php in the script.

    Odd that there isn’t a public function to do this, as there is for posts/pages?

Viewing 1 replies (of 1 total)
  • The topic ‘Inserting links/bookmarks programmatically via function?’ is closed to new replies.