tmdelamar
Member
Posted 16 years ago #
Okay, I have about 4 customized themes that I'm using as options for a static front page. The pages are showing up nicely. I uploaded the proper 'screenshot.png' images to each theme directory, so that shows nicely too. Here's where I'm stuck. When I preview each theme.....it comes up in a new window with an option to activate that theme, but the page background, color, is all wrong. My page templates have the styles embedded in the page.php. Obviously, the theme preview is picking up from the style.css. I can't figure out if the preview is calling a particular .php file that I can simply alter to match my page.php? I'm looking in themes.php. Can anyone provide some assistance. I've been searching and searching and have probably been looking at the code too long.
The theme-preview in themes.php comes from three files
wp-includes/js/thickbox.js
wp-includes/js/thickbox.css
and wp-admin/js/theme-preview.js
whick are preloaded at the top of themes.php via
add_thickbox();
wp_enqueue_script( 'theme-preview' );
Any link in themes.php with a class="thickbox" makes the magic happen. Remove the class="thickbox and the preview_link will simply open in a new browser window.
The background color in the fancy floating iframe is added by css in thickbox.css.
More about thickbox: http://jquery.com/demo/thickbox/
Whoops, theme-preview also needs:
/wp-includes/js/jquery/jquery.js
/wp-includes/js/jquery/jquery.color.js
tmdelamar
Member
Posted 16 years ago #
Thank you for explaining that to me. Turns out, my problem was in the renaming of my themes. I had 2 different themes named Theme4 and Theme 4. The Theme 4 was picking up files and the stylesheet from Theme4. Once I changed the name of Theme 4 to something more clearly unique, it's picking up from the proper directory. Lesson learned.