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!
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:
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.
Quick little snippet here that may come in hand. If you’d like to add support for excerpts for a download when using Easy Digital Downloads, just add the following code to your functions.php:
You’ll then see the Excerpt meta box appear on the edit screen for downloads! You can output it using <?php the_excerpt(); ?>.