Setting theme dynamically is certainly possible, but not too convenient since it’s hardly “normal” mode of operation.
In my experience this works best if you stay away from higher level template/stylesheet hooks and instead filter underlying options. In that way you can trick WP into thinking that configured theme is different from what it is and use it.
For a code example there are quite a few theme switchers around. You can take a look at Toolbar Theme Switcher plugin’s code for one take on it (disclosure — I am its developer).
Related Posts:
- Hide Meta Boxes for Non-Admins
- Adding custom image sizes and post types to a plugin or to a theme?
- Create a simple Testimonial page
- Methods for development wordpress themes [closed]
- Adding CPT changes entire layout of my site except for the archive of that CPT
- How to get ‘Products’ on home page?
- Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu
- Create a custom archive page for a custom post type in a plugin
- Media library – Limit images to custom post type
- How to Add Custom Taxonomy To Woocommerce Plugin
- Development of a WordPress Search Plugin – Best Practices
- Prevent trash/delete action on specific post types
- How to add custom content template part for a custom post type on main query using a plugin
- Rewriting ‘rewrite’ slug for custom post type used by plugin
- echo value from ‘select’ field type into page template using cmb2?
- register_taxonomy with multiple object type and update_count_callback
- How often do you need to register_post_type?
- How to use a dedicated template for the Custom Post Type from a plugin?
- Add Capabilities to Custom Post Type after it has been created [duplicate]
- White screen error for a custom theme
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Getting arguments for register_post_type from a plugin generated post type
- Themes VS Plugins [duplicate]
- update a post meta from a single table cell TablePress
- Remove POST_TYPE from custom post type permalink
- How to add post_author column to custom post type
- How to register custom post types in a plugin?
- Issue to get wp_get_attachment_image with cmb2
- Best action hook to create custom post and assign taxonomy terms to it on plugin activation?
- Shortcode insertion in tab
- Can’t get order_by meta_value_num to work properly
- Is it possible to place custom post type files inside a folder in theme directory?
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Custom posts don’t work
- single-{cpt}.php ignored
- Insert and then update post_type by wp_update_post
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- add category name to permalinks on product page /category-name/product-name
- Get term name and term parent into custom post type permalink
- Action or Filter Hook for a Custom Importer
- How to set a CPT to have a page as a parent, then rewrite urls accordingly?
- Addition of custom option panel crashes Media Library & Admin Area
- Dynamic dropdown select values depending on other custom field value
- Post injections into Site Origins Page builder [closed]
- WordPress randomly shows 404 errors
- Custom Post Type slug same as page name
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- How can you use one database with multisite
- How to add multiple images to a custom post type without plugin [closed]
- How to create multiple editor?
- Custom post type, have only my meta boxes
- New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?
- Running a song lyrics site on WordPress
- Using page slug in wp_query
- Specify a particular page to list all custom types
- How to have permalink like domain.com/term/postname?
- Template Hierarchy for custom post type pages
- Pagination hitting 404 page on /page/4
- Can’t delete a custom post in front end with custom role
- Post URL based on Custom Post Types variables
- Add custom field to admin area witthout using a metabox
- Override Plugin Custom Post Type ‘single’ view
- Custom pages missing on “front page” setting
- Create Custom Post type that uses Page.php template
- Overriding Plugin Function in Child Theme
- Send post changes to set email addresses (not users or subscribers)
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Accessing a protected property of a post
- Multiple archives to display parent and subcategories content
- wordpress post_where set only for my costum post type
- Custom post type 404 error on “default” or “numeric” permalinks
- Custom Post Type – Main page for certain posts
- display two images in theme header.php file
- DIVI Theme customizer changes not applied on existing pages and designs are not shown on the front
- custom post type single page not found after aotumatic publish By the author’s robot
- Set a template on a custom post in the plugin
- Simple way to hide\show an announcement (just a div) on homepage?
- Custom Post Type works when registered in functions.php but not when registered in plugin
- Restrict Custom Post Type to One Item
- Add input radio menu to post
- Simple Data picker meta box
- I can not call the categories of custom post type
- Link two different post using there post_id in post meta
- Custom post type that lets users create a set of posts?
- How to create groups like that in buddypress?
- Custom Fields through plugin in a Custom Post Type
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- Remove custom post type generated by a plugin (The Events Calendar) [closed]
- Show custom taxonomy not in submenu
- How to load custom post type plugin after acf options page (or get settings from there another way)?
- Loop carousel slider in wordpress
- How to Fix WordPress 500 Internal server error due to custom post type
- get_post_types doesn’t work in plugin
- erase post excerpt limitation [×]
- Configure which plugin custom post types get registered
- Display Custom Post Type on Toolset Types Plugin
- How to manage wordpress knowledge base/wiki/posts collections
- Retrieve a post with its ACF repeater fields in wordpress
- How to make content as required in custom post type?