One of our customer requested a code snippet to write a function which will check that if current post or page has a specific Oxygen template assigned.
Add this code in functions.php or Code-snippet plugin of your choice.
WordPress does not have the ability to add Tags and Categories to Pages by default. This is sometimes useful in order to filter pages easily using the Oxygen Repeater Element. Paste the Below Code in the PHP section of your favourite code editor and set Visibility to everywhere, no need for an extra plugin. Add…
Use this code to redirect a viewer directly to the page, if only 1 search result is found. Useful when people know exactly the model number they want for an ecom store.
In this tutorial you will learn now to hide the admin bar when logged in. This can be useful if you have a membership site and you don’t want to give users the ability to log out. To hide admin bar for all users To hide the admin bar for certain user levels. NOTE: Remember…
This code allows you to blur the background when someone triggers a modal, it helps put focus on the modal and not the background. The blur strength can be adjusted as needed. Add this to the main style sheet.
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.
Here is an example code snippet for creating a custom gallery slider for WooCommerce products: In this example, we are using the woocommerce_product_thumbnails action hook to add a custom gallery slider to the product page. We are using the Owl Carousel jQuery plugin to create the slider and enqueueing its required CSS and JS files.…
Prepared config files to get you started fast with best practices
If you want to load your theme.css file inside Gutenberg editor you need to create special function for that. Create one file that has CSS/SCSS and write your theme style there. Then you will need one more code block to load styles css inside Gutenberg editor Create Code Block and assign Trigger location > Everywhere…
In WordPress, when you use the search form to search something, the result page contains POSTS and PAGES by default if it is Default WP_QUERY. Sometimes we don’t need Pages to be shown in search results or we need some Custom Post Type also to be included there. Here is a code-snippet for that. Implementation…
This can be used with Gutenberg, Oxygen, Bricks, Elementror or any other visual builder. This code is optimized for Scripts Organizer. I can not guarantee that it will work in other code plugins. Create code block Scripts Organizer settings: Inside the php replace iFrame SRC with your own url
Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Scripts organizer plugin. Avoid adding custom code directly to your parent theme’s functions.php file, as this will be wiped entirely when you update the theme.
Horizontal Admin Menu that works nice with Script Org or WP Admin Cleaner. Add the follwoing to Script Organiser or in WP Admin Cleaner under themes > inject custom CSS. It also comes with a the collapsed horizontal desktop menu too.
Note : The use-cases for this are below : 1. Using Swiper Slider and want to edit all the slides in Oxygen and show slider view only on front-end. 2. Using Scripts that runs only on front-end or load after the page-load. In Oxygen builder they displays an error like ‘SCRIPTNAME’ is not defined or…
This code will add additional categories into oxygen block library
3rd party plugins actions admin archive Blocks build Category composite elemenets compression core CPT CSS Custom Custom Post Dashboard Developer development editor Front End gutenberg hook Image img include js load styles loop Must Have notice npm Oxygen plugins publish repeater script scss settings page single product Taxonomy themes Tips WooCommerce wordpress WP Admin WPML