In functions.php you can create “your_set_tables_function()” and then hook it in the “after_switch_theme” hook.
Example:
add_action("after_switch_theme", "your_set_tables_function");
Related Posts:
- Using the same database on another Subdomain
- Opinions and recommendations on the best barebones base theme [closed]
- Customizing a WordPress theme without changing it?
- How to Link External jQuery/Javascript files with WordPress
- Custom Taxonomy-specific JavaScript
- Any official way to create an admin theme?
- Splitting an Evolving Site into Multiple Sites, or Maintaining as One Site?
- Building useful features into your theme
- Multisite: setting theme and options when a new blog is created
- Editing theme files and access to the Code pages only to super-admin?
- Change Default Image HTML
- How to delete default themes
- Extra User Profile Field Upload File / Image
- Edit raw HTML of the landing page
- Problem : deletion failed, the theme requested does not exist
- WordPress Backup
- Will activating a different theme preserve custom settings to current theme?
- I want to run different WordPress websites under the same database
- Can I apply a WP theme to a specific custom page template?
- Delete database tables on theme uninstall?
- How to trigger function on theme delete?
- Setting a static home page and blog page without using the settings
- Two Navigation Menus – secondary nav is including main nav
- Possible to put header-{your_custom_template}.php in subdirectory?
- Renaming the Twenty Fourteen WordPress theme
- Protect changes made to the theme when updating
- Theme Development Admin Area [closed]
- How to set a single theme directory on a multisite blog?
- Should a child theme share the same theme options row as the parent, or should it have it’s own options row?
- Are theme .php files stored in the database?
- Static page not working
- Posts and Pages not showing on admin, but showing in theme
- Custom options below pages/posts editor?
- 1 Database for multiple WordPress themes
- Problem of running development copy of WordPress on WebMatrix?
- Different logo on homepage
- the_content() is not displaying content, why? [closed]
- What is the correct way to integrate wordpress with another php application?
- Customizing page content layout
- Tips for managing code when developing a parent theme framework
- How to transform a custom made static HTML website to a WordPress website [closed]
- Trying to uninstall a theme, but it’s hijacking my home page
- Most wp_nav_menu parameters ignored
- How To Show Different Footers For Different Post Types Pages?
- How to include stylesheet in custom admin using parent_slug
- different theme in one website
- Custom fields not displaying on front end
- My blog suddenly can’t find my stylesheet?
- Customizing 1 theme for multiple blogs in a multisite setup
- I’ve got a theme I can’t update and won’t let go
- Is there any way to modify images from a theme using the web interface?
- Trying to revive an old wordpress site, but newer versions of wordpress install a different db structure
- Switching among theme customizations
- The function is deprecated; use mysql_real_escape_string() instead
- Default and warning messages & no login
- dynamic image path within a javascript file
- Uploaded WordPress theme not finding pages and css
- Display ads by location [closed]
- WordPress Dashboard Problem [closed]
- Theme Dev | Convert Template to Theme
- WordPress Theme Migration Local to Live Assets Not Loading
- Work on theme files on a server & browser preview before installing it
- How to change images size after theme modification?
- Create a child Theme or custom Theme
- Theme Options Menu Item – Permission Issue
- Static front page displaying twice
- 2 WP websites same content different themes
- Static posts page is not working
- Changes to code not displaying
- How to change database entries due to theme change
- Change information (phone number) in header of WordPress site using Veda theme
- How to trace and resolve a theme problem such as flickering links in WordPress? [closed]
- On a Https site, Css and Js Url are back to http after redirect the site
- Trying to fix a website that was built with WordPress and then taken off of it
- How to integrate JSS to WordPress
- wp_enqueue_style $dep argument does nothing?
- Changing URL of scripts, scripts outside theme folder?
- Issue with theme mod options during domain migration
- get_the_post_thumbnail() produces different HTML on same arguments
- FTP + Unable to locate WordPress content directory (wp-content)
- Download Themes From LocalHost WordPress Site [closed]
- Re-zipping or extracting theme from wordpress site files
- Posts as filtered list – expandable
- WordPress 5.1 upgrade has lost the parent theme JavaScript
- Why submenu item’s background color is not changing by css?
- How to add custom JS file in WordPress Child theme with get_theme_file_uri
- Hi everybody, I have a problem of search box
- Is a very simple theme secure enough?
- Adding the jQuery to my theme that already exists in WordPress?
- New WordPress Theme Not Showing in Blog
- WordPress broken after domain name change
- Can local WordPress installs share /wp-content/ folder and database?
- Interpretation and explanation of register sidebar
- A wordpress site keeps editing wp-content files after migration
- Edit value=”” of a button in child theme
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- Moving FB comments at the end of page
- WordPress Baskerville 2 translation
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- WordPress theme logo handling (Trying to use GIF as logo)