• Resolved seanprice

    (@seanprice)


    Love this plugin but if I wanted to add an additional field to add to the database so not only the only URL and landing page but for example Redirect Title.

    I have added the additional field to the page but cannot get it to save to the DB?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Scott Nelle

    (@scottnelle)

    Right now I’m storing the data in the wp_options table because it’s easy to use when you’ve got 2 pieces of data for each redirect (a redirect and a destination.) If you want to add a third piece of data (title) you’ll probably want to move the data to it’s own table. To do so, you’ll have to modify the save_redirects(), expand_redirects(), and redirect() functions. Basically every spot where you see get_option() or update_option() you’ll need to modify the code to store your data in a new table. You’ll also have to write an install function that creates the table. You’ll probably also want to rename the plugin so the next time I update it doesn’t wipe out your changes.

    Good luck!

    Thread Starter seanprice

    (@seanprice)

    Thanks, solved it a little while ago.

    So, if I install this plug in, can it be set to say make it so that if someone clicks on link https://www.ourhometools.com/bostitch-tools.php it will transfer to my correct page at https://www.ourhometools.com/bostitch-tools and will I have to do the same thing for every URL ending .php?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Simple 301 Redirects] Additional fields’ is closed to new replies.