This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Function that Saves/Loads the Theme Options

  • Creator
    Topic
  • #1234
    spyke01
    Participant

    We are copying sites from one domain to another and when we find/replace the domain name any serialized arrays in the DB get destroyed meaning that all the theme options are lost.

    We were looking for the hooks that save/load the theme options data but can’t find it. Can you tell us which functions/hooks are responsible for saving/loading the options data?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #1236
    Jason Bobich
    Keymaster

    When you make the transfer using a tool like this to do your find/replace should eliminate the problem. — http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    But the options are simply stored by WordPress in the wp_options table. The theme doesn’t actually do it; WordPress does it because the options are registered by the theme with WordPress Settings API. This is just how WordPress stores the data. I don’t think this is anything you can change.

    #1239
    spyke01
    Participant

    Thanks for the link to the script, it may help. Is there any way to make it store the settings as individual ones instead of as an array?

    #1240
    Jason Bobich
    Keymaster

    No because you’d have to re-structure everything, including how settings are registered with WordPress, how they’re all sanitized, and how they’re retrieved. And from the frontend of the site when retrieving these options, unless you again rigged up something completely custom to pull the options, it means every option you’d have to make a database query to pull it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.