Here’s a PHP snippet that you can use to return a custom link to a specific language for the current page using WPML. This will output the custom link for the specified language code and can be used on any page. Example 1: This will output a link that says “Switch to French” and links…
This php snippet will provide you with a more efficient way of organizing and keeping track of your blocks in Oxygen builder.
This code will add additional categories into oxygen block library
Just a simple function that will hide products that have price set to 0. I found it useful when I was importing products from some external source where client decided to add prices manually. In case that there is no price set to 0, where price is empty this snippet could be used.
This snipet create a shortcode that you can use on any post to show estimated reading time in minutes. It will simply return a number of minutes. Shorcode: [reading_time] or [reading_time wpm=”100″ gt=”true”] parameter wpm is words per minute value, default is 300 and if you use gutenberg blocks, set gt parameter to true
Sometimes is usefull to see if some post or page have feature image or not, this code will add small image at end of tables in admin pages and posts sections. It register new image size 120×120 that is used in this case.
With this example you can easily add cart count or total price anywhere on your webshop. This code uses woocommerce add to chart hook that is executed every time when you put something into basket. You just need to add this code anywhere where you wish to show total price. And this snippet will execute…
If you are using SlimSeo plugin it automatically add all posts and taxonomies into sitemap.xml file. This snippet allows you to exclude some post types and taxonomies from sitemap file. In this snippet above from sitemaps file will exclude ‘help’ and ‘slider’ post type, and ‘category’ taxonomy.
Sometimes is usefull to add additional text under the product price. With this hook you can easily show additional text just under the price. You can use ScriptOrganiser, CodeSnippets or any other similar plugin. This hook could be extended to show message only on specific products. In this case you will need to add ID’s…
3rd party plugins admin after_body Alt archive Blocks Category clean up composite elemenets core CPT CSS Custom Custom Post Dashboard flexslider Front End FSE full site editing Gallery hook HTML Image load styles Must Have notice Oxygen Password Permalink plugins Post List Publish Date repeater settings page share single product Taxonomy Taxonomy Term themes Tips Topbar WooCommerce wordpress WP Admin WPML