How to go about pre generating css file with variables from theme options

$ss_dir = get_stylesheet_directory(); // Shorten code, save 1 call ob_start(); // Capture all output (output buffering) require($ss_dir . ‘/library/css/dynamic.css.php’); // Generate CSS $css = ob_get_clean(); // Get generated CSS (output buffering) file_put_contents($ss_dir . ‘/library/css/static.css’, $css, LOCK_EX); // Save it Regards. PS: You cannot be a developer with scratchy files’ skills. They’re not optional.

Archiving annual festival site

Personally. I would archive the 2010/etc sites to Pure HTML. This plugin would do the job http://wordpress.org/extend/plugins/static-html-output-plugin/ This WordPress codex post describes another method. With using WordPress in its own Sub Directory and archiving sites: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Pointing_your_home_site.27s_URL_to_a_subdirectory

Switch to other theme at URL

Given that this is an older question and the mention plugin is very much depreciated, both the WordPress core and themes have changed greatly since then. Nowadays, most themes are mobile-friendly and will conform based on the amount of screen space is being used to visit a website.

Why are my sidebars not registering in unit tests

First, you can (should?) register sidebars generally, there’s no need for a specific hook (and widgets_init might not be the best one). Second, you don’t need to specify IDs, as they are generated automatically. You can, of course, but there’s also no need to. Just put the following in your functions.php: register_sidebar( array( ‘name’ => … Read more

Disable Sidebar in the Product Page in Storefront Theme [closed]

for product page, you can put in functions.php function remove_storefront_sidebar() { if ( is_product() ) { remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 ); } } add_action( ‘get_header’, ‘remove_storefront_sidebar’ ); It works with latest woocommerce 2.5.2 Also CSS is needed: .single-product.right-sidebar .content-area { float: none; margin-right: 0; width: 100%; }

Delete database tables on theme uninstall?

Yes, you can accomplish it by WP default functionality. Let me explain it. 1. While switch theme: There is a switch_theme action that runs right after the theme is switched. switch_theme is triggered when the blog’s theme is changed. Specifically, it fires after the theme has been switched but before the next request. Theme developers … Read more