Best way to include Bootstrap in WordPress

You can add bootstrap in WordPress by following function in functions.php You can change url as you need if you have cdn. <?php /** * Enqueue scripts and styles */ function your_theme_enqueue_scripts() { // all styles wp_enqueue_style( ‘bootstrap’, get_stylesheet_directory_uri() . ‘/css/bootstrap.css’, array(), 20141119 ); wp_enqueue_style( ‘theme-style’, get_stylesheet_directory_uri() . ‘/css/style.css’, array(), 20141119 ); // all scripts … Read more

W3 Total Cache, CDN and theme files [closed]

You need to either Version your files (by calling it style.css?ver=xxx.xxx) and making sure your CloudFront distribution has “Forward Query strings” turned on. This is the better option, as it means that all you need to do is increment the number in the query string and CloudFront will fetch this file automatically. Manually invalidate your … Read more

Starter Theme vs Parent Theme? Pros and cons

I totally agree with Rarst. I just want to add some small things. Note: I differentiate parent theme and framework. In my answer, I consider parent theme like TwentyEleven where it’s mainly created for a specific website and less hooks than a framework. Starter theme: Pros Easy to customize at HTML level. I mean something … Read more

How do I change the header image height in Twenty Seventeen?

I found (part) of the css code that controls the height in wp-content/themes/twentyseventeen/style.css. There is code that applies when the admin bar is not visible (typical anonymous user) currently at line 3629 .twentyseventeen-front-page.has-header-image .custom-header-media, .twentyseventeen-front-page.has-header-video .custom-header-media, .home.blog.has-header-image .custom-header-media, .home.blog.has-header-video .custom-header-media { height: 1200px; height: 100vh; max-height: 100%; overflow: hidden; } And code that applies when … Read more

What does exactly GPL license mean for my WordPress theme?

Does this licensing scheme (for file groups) violates the WordPress license? No, only the PHP code needs to be GPL’d. A popular example is Thesis: http://mashable.com/2010/07/22/thesis-relents/ http://markjaquith.wordpress.com/2010/07/17/why-wordpress-themes-are-derivative-of-wordpress/ Do I have to publish the PHP code of the theme so it is available to everyone? You don’t have to publish it if your intention is to … Read more

Link to specific Customizer section

As you’ve already discovered, links to the customizer always start with /wp-admin/customize.php. Append ?autofocus[section] =section_name to checkout your section within the customizer. Both parameters (section and section_name) are registered within your customize_register hook: $wp_customize->add_section If you can’t find the hook, check the HTML markup of the customizer for further information. Both parameters are included within … Read more