WordPress.org

Ready to get started?Download WordPress

Forums

Generate post automatically with a sql table (2 posts)

  1. sugarFornaciari
    Member
    Posted 1 year 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

    mydomain.com/my-page/beat-it
    mydomain.com/my-page/beat-it-2
  2. AJ Mallory
    Member
    Posted 1 year ago #

    Have a look at WP_Rwrite, I think it will do what you are looking for
    http://codex.wordpress.org/Class_Reference/WP_Rewrite

    See this for details on mod_rewrite:
    http://www.sitepoint.com/guide-url-rewriting/

Topic Closed

This topic has been closed to new replies.

About this Topic