Generate post automatically with a sql table (2 posts)

  1. sugarFornaciari
    Posted 3 years ago #

    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

  2. AJ Mallory
    Posted 3 years ago #

    Have a look at WP_Rwrite, I think it will do what you are looking for

    See this for details on mod_rewrite:

Topic Closed

This topic has been closed to new replies.

About this Topic