It’s easy to forget to turn indexing back on after you’ve finished developing a site, this snippet will remind you. No extra plugins are necessary. This should be a part of every template you have. Load this in the admin area only.
Sometimes you have a post type that needs to stay private, like video tutorials for your clients or a quotes for products that should not be seen by the public or indexed by the search engines. The snippet below will allow you to set all posts from a given post type to private by default.…
1st Step Install and activate Code Snippets plugin. Add below code in code snippets: 2nd Step Edit the Oxygen Template that applies to woo single products. For the element you want to apply the “minimum 1 upsell” condition, click on Conditions icon then Set Conditions. Click “Add Condition” icon. Choose Dynamic Data condition. Under Advanced click PHP Function Return value. Function Name: wpl_check_upsell_product…
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.
Are you Curious how to remove the slug of a custom post type in WordPress? If you’re using CPT UI, there’s an option called With Front but that doesn’t always seem to work. Follow this tutorial, add these two simple functions and the slug will be removed from your custom post type URL. Note –…
If you would like to get rid of the “Category:”, “Tag:”, “Author:”, “Archives:” and “Other taxonomy name:” in the archive title, use this little function in Code Snippets The Below can be added using a plugin like Code Scripts organizer or Code Snippets.
Here is a way to add WooCommerce cart icon to a menu with the cart item count, it links to the cart page and displays the number of items that have been added to the cart.The code uses three functions which need to be added to Snippet plugin. Create a shortcode for the WooCommerce cart,…
For retrieving the best buying products in WooCommerce we are using wp_query manipulation with meta_key as “total_sales” and orderby “meta_value_num”. In short we are displaying products as per the total sales number. Here is Screenshot for repeater / easy posts Step 1 – Select Advance WP Query Step 2 – Setup Advance WP Query as…
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…
Oxygen does not support WordPress wp_body_open() and if you need to integrate Google Tag manager it requires two code parts. 1st part is Inside Head and 2nd is inside Body. Lucky Oxygen provides hook that is called: ct_before_builder. If you are using Scripts Organizer , Code Snippets or any other functionality plugins this script will…
Iconoir is one of the biggest open source libraries with currently 1007 SVG Icons. Really nice designed outline icons set done by Luca Burgio. Original Icons are exported as outlines. I have converted outline to fill and used IcoMoon App to make it as icon set ready for Oxygen. Download them and enjoy! Thanks to…
This is for GreenSock
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