Create a custom shortcode for WordPress

28. May 2019

Add WordPress user with code

15. March 2019

This goes into functions.php. Remember to remove the code as soon as you have logged in

Add custom field to the ‘My Account’

13. March 2019

Remember to create a new ACF field and set the Location to ‘User Form is equal to Add /edit’ (‘Brukerskjema er lik Legg til / Rediger’)

Tracking Contact Form 7 (CF7) with Google Tag Manager (GTM)

9. January 2019

Hide the product’s weight and dimensions

7. January 2019

A really simple Wp Query

15. December 2018

Enable/Disable the ‘Ship to a different address?’ checkbox

10. December 2018

To Enable:

To Disable:

Check filename ending & a fileuploader

19. September 2018

 

To use with ACF

 

Change WooCommerce Email style

22. August 2018

 

Remove the redundant words from WooCommerce Tabs

31. July 2018

Goes into woocommerce.php

Update cart without the update button in cart.php

31. July 2018

Goes into woocommerce.php or functions.php

 

Add TILBEHØR (accessories) to WC Tab on single product page

30. July 2018

 

Add extra space to the breadcrumbs

30. July 2018

Goes into woocommerce.php (or functions.php, but you should have a woocommerce.php if you have woocommerce running on your site)

 

Check if a product is in stock

27. July 2018

 

Change the default ‘Sale’ text to custom

24. July 2018

Goes into functions.php:

 

Check if user is logged in and do something

10. July 2018

 

Get site url

8. July 2018

Gives you the sites url..

<?php echo get_site_url(); ?>

Gives you a specific page:

Gives you an image:

Change sorting

2. July 2018

Change sorting on products that are ‘connected’ to a product

Goes into the functions.php

Change the orderby and order, to change order.

If you just going to change Standart sorting on all Products. Go to: WooCommerce -> Settings -> Products -> Display -> Default Product Sorting

Check if a template is in use

13. June 2018

This snippet is collected from a plugin, to check if the theme folder has a xyz.php file, if not, then the xyz.php from the plugin is loaded.

 

Using the GDPR app with cookies

28. May 2018

How to make sure the user have the possibility to disable a cookie, goes into function.php NB! HAVE NOT BEEN TESTED BY ME:

See also: https://gdpr-wp.com/knowledge-base/enabling-or-disabling-functionality-based-on-consent-and-cookies/

Add Length, Height and Width to Single-product

16. May 2018

Goes into functions.php

Set the Thumbnail size

15. May 2018

This goes into your theme setup function in functions.php

(To register new sizes: https://developer.wordpress.org/reference/functions/add_image_size/.)

Hook example

8. May 2018

Add Taxonomies for media gallery

6. May 2018

Goes into functions.php

Register a custom post type

21. April 2018

This goes into functions.php

WP-CLI nice to know

20. April 2018

Inside your www folder

Edit text in WooCommerce Message Error

20. April 2018

Search fix. Hide hidden products when searching.

20. April 2018

Add breadcrumbs to your wordpress site using Yoast SEO

18. April 2018

This goes to your single.php or page.php:

Second, activate breadcrumbs in Yoast CEO plugin.

How to activate the form for password protection

18. April 2018

This goes into the single.php for example.

//Your HTML content goes her

Hide/show password protected posts on specific pages

18. April 2018

This goes into functions.php

To hide Password Protected posts from the ‘loop’

18. April 2018

This goes into functions.php