Skip to main content

Batch script to update WooCommerce product titles

I had a client who had named all of his 600+ products to uppercase and Google Shopping was not allowing the products to be indexed because of this.
To automatically rename the Woocommerce Product titles, I ran this script:

This will loop through each product and rename the titles to capitalised using php UCWORDS()

For example: MY PRODUCT will be renamed to My Product.

Read More

Add featured image to admin table in WordPress for custom post type

On a project I’m doing, I created a custom post type for a catalogue and want the featured image to display on the admin table.

My custom post type is called “product” and I want to limit the feature to only the “product” custom post type. Here’s how I did it.

I added this into functions.php

Read More

Remove container and UL on WordPress nav menu

Sometimes you might want to programatically include other things in your menu in WordPress and to do that you will want to control the UL tags so you can insert other LI items within it.
The code below will allow you to spit out ONLY the LI tags from a WordPress Nav Menu, you will have to wrap it in UL yourself so you can add extra LI.

Read More