Just today I had to add a logo to a WordPress menu on a site I was working on. Because it is a graphic that I needed to add, I couldn’t easily use the default WordPress menu functionality to accomplish this. One possible workaround, I think, could have been to add a class to the… Continue reading Programmatically Adding a Menu Item to a WordPress Menu
Category: WordPress
Hiding empty paragraphs
For the most part, I have really warmed up to the Gutenberg editor in WordPress. It took me a while. I was very used to the “old ways,” but the flexibility and promise of Gutenberg have won me over. One small thing that I have noticed, though, is that it is really common for users… Continue reading Hiding empty paragraphs
A Fallback for Ray
As I mentioned in a previous article, I really like using Ray for debugging as I develop WordPress projects. However, one thing that can be easy to do is to forget to remove all of your calls to ray() and upload to a production site where the Ray plugin is not installed. Then… ack! An… Continue reading A Fallback for Ray
Using an SVG Icon for a WordPress Custom Post Type
When creating a Custom Post Type in WordPress there is a convenient way to select a custom icon when registering the post type. WordPress comes with a set of built-in icons called Dashicons that have easy names that can be used for your menu_icon property: Having these icons at hand is great. Unfortunately, I often… Continue reading Using an SVG Icon for a WordPress Custom Post Type
Creating a Rewrite Rule in WordPress
Recently I had to create an endpoint for users to view a dynamically-generated PDF on a site. I wanted to have a nice-looking URL for users. I found it difficult to wrap my head around the process of adding a rewrite rule in WordPress but I finally figured it out. WordPress offers a function, add_rewrite_rule,… Continue reading Creating a Rewrite Rule in WordPress
Passing PHP Variables to JavaScript in WordPress
One thing that I found difficult to understand when starting out with WordPress development was how to use PHP variables in my JavaScript. I’m not sure why I found it so confusing. There are a lot of good examples out there but I thought I would break down how use PHP variables in your JavaScript… Continue reading Passing PHP Variables to JavaScript in WordPress
Transferring a WordPress Site from One Server to Another
One thing that I have to do fairly frequently is to move a WordPress site from one server to another. Examples of this can be moving a site from staging to production or production to my local environment. There are a lot of ways to do this but I thought I would document my process.… Continue reading Transferring a WordPress Site from One Server to Another
WordPress Plugin for the BotMan Web Widget
I recently was working on a chatbot for a website and wound up using a great PHP library for the task, BotMan. With BotMan, you can follow the really well-done documentation to set up a BotMan endpoint. This is where any client would call to send requests and where logic would be placed to respond… Continue reading WordPress Plugin for the BotMan Web Widget
Creating Unique IDs for ACF Repeaters
I love Advanced Custom Fields and find it to be an essential tool for developing with WordPress. I ran into a challenge recently using Repeaters where I needed to be able to target particular rows for JavaScript. I wanted to be able to depend on each row having a unique identifier that would not change.… Continue reading Creating Unique IDs for ACF Repeaters
Using Tinkerwell with Local by Flywheel
I have been using a wonderful web development tool, Tinkerwell, in my workflow to test and refine queries and code while I build out websites. For those not familiar with Tinkerwell, it is an application that allows you to run and test PHP code and immediately see the results. It is like Tinker for Laravel… Continue reading Using Tinkerwell with Local by Flywheel