Change ‘Add To Cart’ Text in WooCommerce

UPDATE: New updated post here!

Whenever there’s something I struggle to find a clear answer for (and eventually figure out myself), I like to post it for those who need help later. This is one of those times.

If you ever wanted to change the ‘Add To Cart’ text on your WooCommerce site, just add in the following code to your functions.php file (or similar):

Don’t forget to change the text to whatever you’d like your button to say!

Exclude Featured Image From Gallery Shortcode

I came across this great snippet after some extensive searching and just wanted to share it to avoid others having to search long and hard just to find it. Authored by TheDeadMedic over on Stack Overflow, inserting the following into your functions.php file will exclude the_post_thumbnail or featured image of a post from its gallery:

Change Title of WordPress Meta Boxes

I came across this awesome snippet the other day that I thought I’d share and expand on it a little bit.

When you want to rename the title of a meta box, custom or core, the best way is to remove that meta box and then re-add it with a new title, using something like this:

You’ll need to change the fields above though for:

  • METABOX_ID – eg. commentsdiv. See below for full list.
  • META BOX TITLE – Whatever you’d like to rename the meta box.
  • METABOX_CALLBACK – eg. post_thumbnail_meta_box – See below for full list.
  • POST_TYPE – eg. post, page, etc.

Continue reading