Title: Slug creation code
Last modified: August 19, 2016

---

# Slug creation code

 *  Resolved [ArkaneArkade](https://wordpress.org/support/users/arkanearkade/)
 * (@arkanearkade)
 * [16 years ago](https://wordpress.org/support/topic/slug-creation-code/)
 * I have a plugin made which uses a page with a GET value. This accesses a database
   and takes information from a database, but it also needs to provide links to 
   other pages which have been created with wordpress, using the same values.
 * Getting the information works fine, but if I use a link for a place which has
   any html entities in it, such as “Melmerby & Locherby” then the links fail, obviously
   because the slugs have hyphens instead.
    Is there any way to create these slugs,
   as all the pages will be using the wp default ones, so just the generric code
   would work.
 * Alternatively, is there a way to get a permalink according to a pagename with
   a specific parent, as that would work just as well.
 * Cheers

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years ago](https://wordpress.org/support/topic/slug-creation-code/#post-1516631)
 * [http://codex.wordpress.org/Function_Reference/sanitize_title](http://codex.wordpress.org/Function_Reference/sanitize_title)
 *  Thread Starter [ArkaneArkade](https://wordpress.org/support/users/arkanearkade/)
 * (@arkanearkade)
 * [16 years ago](https://wordpress.org/support/topic/slug-creation-code/#post-1516692)
 * OK, thats awesome. I ended up working into another way with it, but looks like
   my code is changing again since I was querying the database.
 * Thanks very much

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Slug creation code’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [ArkaneArkade](https://wordpress.org/support/users/arkanearkade/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/slug-creation-code/#post-1516692)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
