Website Functions Woocommerce Wordpress Joomla PHP JavaScript Python MENU
Welcome to

Website Functions

!

Enhance your website, regardless of the platform, with our diverse collection of
code snippets in PHP, JavaScript, and Python. Our website is dedicated to providing you with a wide range of code examples that can be seamlessly integrated into your website's codebase. With these snippets, you can unlock new functionalities, modify content, and control the behavior of your website across multiple programming languages. Whether you're working with WordPress, Joomla, or any other web platform, our collection of PHP, JavaScript, and Python snippets empowers you to optimize and customize your website according to your specific needs.

Latest Website Snippets

Woocommerce Placeholder

Add Handling Fee to certain shipping method in Woocommerce

Category: Woocommerce

You can achieve this by adding a custom function to your WordPress theme's functions.php file. This...

Wordpress Placeholder

Disable Wordpress default login url and set a custom one

Category: Wordpress

How to disable the default Wordpress urls, /wp-admin and /wp-login</em...

Wordpress Placeholder

Redirect Wordpress default login url to a custom page

Category: Wordpress

In WordPress, you can use the login_init action hook along with the <str...

Wordpress Placeholder

Redirect Wordpress default registration url to a custom page

Category: Wordpress

In WordPress, you can use the login_init action hook along with the wp_redirect...

Woocommerce Placeholder

Hide a specific shipping method in Woocommerce when Free shipping is available

Category: Woocommerce

In Woocommerce if you want to hide a specific shipping method (identified by its instance ID) when the cart total is...

Woocommerce Placeholder

WooCommerce - redirect to previous page after login

Category: Woocommerce

This code snippet uses PHP sessions to store and manage the referring URL (referer URL) when a user attempts to log i...

Wordpress Placeholder

Redirect 404 pages to the home

Category: Wordpress

Create a custom WordPress function to redirect 404 pages to the home page by adding the following code to your theme'...

Wordpress Placeholder

Wrapping embedded images with an image-container class in all posts

Category: Wordpress

We can use jQuery to wrap the images under the specified class with a div having the class image-container. Here's a...

Featured Website Snippets

Woocommerce Placeholder

Add Handling Fee to certain shipping method in Woocommerce

Category: Woocommerce

You can achieve this by adding a custom function to your WordPress theme's functions.php file. This...

Wordpress Placeholder

Disable Wordpress default login url and set a custom one

Category: Wordpress

How to disable the default Wordpress urls, /wp-admin and /wp-login</em...

Wordpress Placeholder

Redirect Wordpress default login url to a custom page

Category: Wordpress

In WordPress, you can use the login_init action hook along with the <str...

Wordpress Placeholder

Redirect Wordpress default registration url to a custom page

Category: Wordpress

In WordPress, you can use the login_init action hook along with the wp_redirect...

Python Placeholder

Include Python code in a HTML file

Category: Python

Did you know that, you can use JavaScript to interact with Python code via a technology called WebAssembly. WebAssemb...

Python Placeholder

Python cron to visit a specified URL at a defined time interval

Category: Python

This simple Python script acts like a cron job, visiting a specified URL at a user-defined time interval: <block...

PHP Placeholder

PHP function to connect MongoDB

Category: PHP

Here's an example of a PHP function for establishing a MongoDB connection: <?php //...

Python Placeholder

Convert CSV to Excel with Python

Category: Python

This is a Python script that uses the pandas library to convert a CSV file to an Excel file: <b...

Joomla Placeholder

Generate Sitemap for Joomla websites

Category: Joomla

The following PHP function that generates a sitemap for a Joomla website: <?php // h...