Tag: WordPress

  • WooCommerce Brands rollout

    With WooCommerce 9.4, WooCommerce Brands is getting rolled out to a cohort (5%) of installs.

    If you do not want to participate in this change set the option woocommerce_remote_variant_assignment to a higher value, e.g. 111

    <?php
    /**
     * Ensures that the Brands feature is released initially only to 5% of users.
     *
     * @return bool
     */
    public static function is_enabled() {
    	$assignment = get_option( 'woocommerce_remote_variant_assignment', false );
    
    	if ( false === $assignment ) {
    		return false;
    	}
    	return ( $assignment <= 6 ); // Considering 5% of the 0-120 range.
    }

    While this is a good feature, it can break your existing brands solution as it did in my case on an existing ecommerce setup.

  • I imported my Instagram archive

    Quite a bumpy road and it took way more time than I planned, but now I have my full Instagram archive on this blog. I do not care very much about my Facebook or Twitter history, but I’m really attached to these images, that take me back to earlier years.

    The content is mine now, and I’m going to spend some time to clean things up and make the browsing more pleasant.

    Take a look

  • Added a photos page

    I just added a photos page to this site. It’s rather short and needs some optimisation, but I’m working on fixing both of theses issues.

    It’s really impressive what you can do with WordPress’ site editor today. Although I start hitting the limits of it. I’ll dive into the theming code later this week.

  • A word counter for Gutenberg blocks

    One of the main goals of – albeit slowly – setting up this blog, is writing more. And I also want to keep track of the length of the posts I make (I’d love to be able to call them articles one time 😉).

    That’s why I implemented a word counter today, that displays the words you’ve written, in the editor, as you type. I based the functionality on the code found here. It didn’t work anymore, but after some research I managed to make it work again.

    Turns out the Gutenberg editor (aka Block editor) is often running in an iframe. Which makes it a tiny bit harder to access the blocks in the editor with javascript.

    Screenshot of the editor with the counter in the top right displaying: 34 words.
    Screenshot of the Block editor with the counter in the top right displaying: 34 words.

    Download the WordPress plugin

    You can find the WordPress plugin here on Github.

    What’s next?

    I want to improve this functionality with a post-wide counter that displays the total amount of words over every block in the post.

  • AM/PM vs 24h in WordPress

    Software localization is hard. WordPress still struggles with the AM/PM vs 24h setting in some places:

    • good: the post scheduler UI on the admin post edit screen
    Screenshot with text: Publish Time 20:56
    • bad: the Publish date on the same admin post edit screen
    Screenshot with text: Publish Today at 8:56 pm
    • bad: the status text after applying the scheduling
    Screenshot with text: AM/PM vs 24h in WordPress is now scheduled. It will go live on Today at
8:56 pm.
  • new features I want to add to this blog

    While I’m slowly setting up this blog, I’m keeping track of the features that I want to add to it.

    Check the list