Title: Inserting links/bookmarks programmatically via function?
Last modified: August 19, 2016

---

# Inserting links/bookmarks programmatically via function?

 *  [lesteph](https://wordpress.org/support/users/lesteph/)
 * (@lesteph)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/inserting-linksbookmarks-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)

 *  Thread Starter [lesteph](https://wordpress.org/support/users/lesteph/)
 * (@lesteph)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/inserting-linksbookmarks-programmatically-via-function/#post-1618608)
 * 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.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [bookmarks](https://wordpress.org/support/topic-tag/bookmarks/)
 * [links](https://wordpress.org/support/topic-tag/links/)

 * 1 reply
 * 1 participant
 * Last reply from: [lesteph](https://wordpress.org/support/users/lesteph/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/inserting-linksbookmarks-programmatically-via-function/#post-1618608)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
