Describe the bug
Reference ticket.
When using the templating system on multisite within a child theme, sometimes the theme path gets mixed up because of late call of restore_current_blog() call.
To Reproduce
Steps to reproduce the behavior:
- Use a child theme
- Multisite
- Add custom template in /asp directory in child theme
- Search within shared post types across blogs
- The template directory is incorrect and links to the main theme directory