When you are opening a panel in the customizer, either you get options directly (like in the »Site Identity« panel) or links to sections (like in the menu area). By default, these links look like in the screenshot below for Slider settings – the section title in a light area background with an arrow on the right side.
We want to change this so that we get a describing text with a button to open the section, as shown in the screenshot for Portfolio feature. Continue reading Using a custom template for the head container of a customizer section
All base controls from the core can be created with the Customize JS API, except the dropdown pages control, that renders as a select list with all pages of the site. This means, we usually need to create that control via the PHP API at the moment.
As a reaction to a wordpress.stackexchange.com question, Weston Ruter wrote a plugin that lets us create the dropdown pages control via the JS API (some details on that can be found in his answer to the question). The important part is the
print_control_templates() method that creates a control template for the JS API to use when it should create a
dropdown-pages control. This template is included in the customizer with the following call in the
add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_control_templates' ) );
In the code reference under developer.wordpress.org/reference you can find all functions, hooks, classes and methods of WordPress. For example, an entry for a function displays which parameters it expects, what return value there is and what the code looks like. Here I describe briefly how something similar can be done. Continue reading Create code reference à la developer.wordpress.org
Since the end of July, I have a »Pay what you want« solution in my theme shop. This post is about the plugin I use for that. Continue reading Realize »Pay what you want« in WooCommerce shop
The last few days I worked on the following scenario: a WordPress plugin or theme gets its update from a private GitLab repo and checks the Git tags for a new version. The result is a WordPress plugin, which also can be integrated into a plugin or theme directly. Continue reading Auto updates for WordPress themes and plugins from private GitLab repos
The technique responsive images prevents users from downloading unnecessary large images. Lazy loading only loads images if they are almost in the visible area, so the user does not download images he does not see. This post shows you how to use lazy loading with responsive images in WordPress. Continue reading Responsive images and lazy loading in WordPress