Symlink a directory to wp-content/themes

You can add this to your VagrantFile for “shared folders:” config.vm.synced_folder “/path/to/your/host/projectfolder/theme”, “/path/to/your/vagrant/wp-content/theme”, owner: ‘www-data’, group: ‘www-data’, mount_options: [“dmode=775”, “fmode=664”] http://docs.vagrantup.com/v2/synced-folders/basic_usage.html

use add_action(‘wp_head’) in a widget for generating dynamic CSS styles

Once the widgets are being evaluated, the head of your site is completed, so you cannot use wp_head anymore. Adding <style> tags is an option, but will indeed generate a warning from the validator. Using the customizer is possibly confusing, because it is supposed to be about theme looks in general, not about specific widgets. … Read more

Add meta-information to theme itself

It is not possible to extend the default headers used by WP_Theme: private static $file_headers = array( ‘Name’ => ‘Theme Name’, ‘ThemeURI’ => ‘Theme URI’, ‘Description’ => ‘Description’, ‘Author’ => ‘Author’, ‘AuthorURI’ => ‘Author URI’, ‘Version’ => ‘Version’, ‘Template’ => ‘Template’, ‘Status’ => ‘Status’, ‘Tags’ => ‘Tags’, ‘TextDomain’ => ‘Text Domain’, ‘DomainPath’ => ‘Domain Path’, … Read more

How to use the responsive images feature from WP 4.4 in your themes

Following our exchange in the comments I’ve reread your question and have a pretty straightforward answer: It looks like it’s working fine. You are worried about the sizes attribute in your second example, but it’s the srcset attribute that you should look at and it is showing all of your image sizes: <img src=”http://xxx.dev/wp-content/uploads/Delft_IMG_6275-e1453192498922.jpg” class=”attachment-full … Read more

WordPress Customize — Move “menus” options / field to another section

The customizer is divided into panels, then sections, then controls. You cannot move a panel inside another panel. However, you can move sections from one panel to another. In this case you can move the sections inside “Menus” to the “Header panel” like this: $wp_customize->get_section (‘AAA’)->panel=”BBB”; Where AAA is the slug of the section you … Read more