Category: Posts

  • WordPress Custom Block Bindings with Block Variations

    This is a follow up to my first block bindings post, and Brian Coords great YouTube video. Combining custom sources for block bindings with block variations can be a simple and powerful tool. Here’s a straightforward example on how they can be beneficial together. With a block theme in the past if you wanted the…

  • WordPress render_block filter to remove all links from post-terms

    I just needed to remove all links from all post terms blocks (for reasons). The filter render_block_{$this->name} is such a great resource for modifying core blocks and made it so simple to do. If you’re doing any kind of work with blocks in WP as a dev, it pays to have this filter always at…

  • Using ACF with WordPress Block Bindings API

    Advanced Custom Fields (ACF) doesn’t have direct support for Block Bindings yet (as of 2024-03-14), but in the meantime, this seems to work by creating a custom source for block bindings: and then reference in a template (use the code editor): Reference: https://developer.wordpress.org/news/2024/03/06/introducing-block-bindings-part-2-working-with-custom-binding-sources/

  • WordPress content in Post Template not editable

    With WordPress FSE, if you run into the issue of not being able to edit or insert content inside the Post Template block inside a Query Loop block. Try temporarily editing the query loop to not inherit and instead be a query that you know will show results. Then it should be editable. Make your…

  • Load 3rd party JavaScript in your custom block

    The best way I’ve found to use 3rd party JavaScript in my custom blocks (for example loading AlpineJS or VueJS) is to register the script and then use viewScript to include it. Here’s an example In your custom block plugin PHP: Then in block.json Now that script will load on every page the block is…

  • Building customizable WordPress blocks

    This is a fantastic video that just came out on working on WordPress blocks and themes: https://www.youtube.com/watch?v=KreJC3aB0q4 The first topic by Michael Burridge is on how to give users control over styling the content of your block, not just the wrapper. This can be done by using CSS custom properties and passing a styles object…

  • WordPress wp-now SQLite location

    I’ve been testing out wp-now and really liking it so far for spinning up a quick WordPress site. What I couldn’t figure out is where the sqlite file was saved when using wp-now in ‘wordpress’ mode for a real site (not just playground). I knew playground database was in ~/.wp-now/wp-content/playground/database/.ht.sqlite But finding the database for…

  • Ecommerce: Where to Start

    This post is particularly written from the perspective to help my local community in Halifax, Nova Scotia, but I believe much of what I recommend will work for other regions. This article is for a business owner that currently does not offer any form of e-commerce, but now due to COVID-19 would like to start.…

  • WordPress Launch List

    Let’s discuss what it takes to launch a typical WordPress site. For this example we’ll assume you have a development site up and running that is now complete and ready to go live. We’ll also assume that you’re not using any fancy deployment process and instead you’ll be launching on a fairly typical shared WordPress…

  • List Your Fears

    Stress is a part of life, but not a fun one. One simple tip I’ve come up with is to write everything down that you’re anxious about in a list. For me this is a Google Keep list, but it can be in any format that you can add to and cross things off of.…