Title: Generate post automatically with a sql table
Last modified: August 20, 2016

---

# Generate post automatically with a sql table

 *  [sugarFornaciari](https://wordpress.org/support/users/sugarfornaciari/)
 * (@sugarfornaciari)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/creating-aut/)
 * Hi guys,
 * I really need your help to find a solution and try to figure out the solution
   from another point of view.
 * In my wordpress database I have added another table where I stored record of 
   music songs (Title, artist, publisher…)
 * I have already created a few line of code in a new template page and I am able
   to retrieve information from my table using params.
    So after having created 
   a page I can pass parameter and get the result of the query.
 * `ie: mydomain.com/my-page/?id=1`
 * I would like to mask this url with something like this
 * `ie: mydomain.com/my-page/song-name`
 * A better solution would generate automatically posts with the records contained
   in my tables and in case of a song is present in 2 or more records would be great
   if using the same functionality of wordpress post, enumerate the permalink
 *     ```
       mydomain.com/my-page/beat-it
       mydomain.com/my-page/beat-it-2
       ```
   

Viewing 1 replies (of 1 total)

 *  [AJ Mallory](https://wordpress.org/support/users/jasonm4563/)
 * (@jasonm4563)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/creating-aut/#post-3081035)
 * Have a look at WP_Rwrite, I think it will do what you are looking for
    [http://codex.wordpress.org/Class_Reference/WP_Rewrite](http://codex.wordpress.org/Class_Reference/WP_Rewrite)
 * See this for details on mod_rewrite:
    [http://www.sitepoint.com/guide-url-rewriting/](http://www.sitepoint.com/guide-url-rewriting/)

Viewing 1 replies (of 1 total)

The topic ‘Generate post automatically with a sql table’ is closed to new replies.

## Tags

 * [automatic](https://wordpress.org/support/topic-tag/automatic/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [generate](https://wordpress.org/support/topic-tag/generate/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [AJ Mallory](https://wordpress.org/support/users/jasonm4563/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/creating-aut/#post-3081035)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
