A countdown timer is a great way to create urgency for an upcoming event, product launch, or special occasion. In this post, we will walk through a simple countdown timer using HTML, TailwindCSS for styling, and JavaScript for the countdown logic. HTML Structure Our HTML consists of a simple layout with four boxes to display…
When creating a plugin settings page using @wordpress/scripts components, you may notice that the styles of your components do not match those in the Gutenberg editor. This happens because the Gutenberg editor styles are not automatically loaded outside the editor interface. To ensure consistency in appearance, you need to manually load the necessary styles when…
This code allows you to lock down your Wordperss Admin Backend so you can only see it from your current IP address. Open Your File Manager in your cpanel Navigate to the wp-admin folderhome > yoursite> public_html > wp-admin Create a file called.htaccess(it must have a (.) DOT) this is a hidden security file. Edit…
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.
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