-
WooCommerce : Disable Repeat Purchase Of Products.
Read more: WooCommerce : Disable Repeat Purchase Of Products.WooCommerce : Disable Repeat Purchase Of Products. Want to sell one product only once per user? Restrict User to buy a specific product only once in a lifetime from your WooCommerce site? Some times in WooCommerce products we need to stop user from buying product multiple time, that means user can buy that product only…
-
Change WordPress Login Logo And Logo URL and Logo Hover Title
Read more: Change WordPress Login Logo And Logo URL and Logo Hover TitleChange WordPress Login Logo And Logo URL and Logo Hover Title How Can We Change The Login Logo And Login Logo URL And Logo Hover Title? Default login page in WordPress is https://yoursiteurl/wp-login.php It contains WordPress logo and on clicking on logo it will take you to the WordPress official site “https://wordpress.org” As shown in…
-
WordPress Shortcode.
Read more: WordPress Shortcode.Since Version 2.5 WordPress supports so called ‘Shortcodes’. Example: Shortcodes can also be used with attributes as the following example shows: Example: WordPress have some of the shortcodes by default (for example the audio one). The following shortcodes are included with WordPress: hortcodes are of both type singular and paired. We can define custom shortcodes…
-
How to Calculate distance between two address using latitude and longitude.
Read more: How to Calculate distance between two address using latitude and longitude.How to Calculate distance between two address using latitude and longitude. According To me it’s one of important requirement in many projects related to address. To Calculate distance between two address using latitude and longitude use this method. function LongLatDistance($Latitude1, $Longitude1, $Latitude2, $Longitude2) { $theta = $Longitude1 – $Longitude2; $miles = (sin(deg2rad($Latitude1))*sin(deg2rad($Latitude2)))+(cos(deg2rad($Latitude1))*cos(deg2rad($Latitude2)) * cos(deg2rad($theta))); $miles…
-
Convert PHP Array into JavaScript Array.
Read more: Convert PHP Array into JavaScript Array.Convert PHP Array into JavaScript Array. We can use PHP array in javascript. For this we have to convert PHP array ,whether the array type is a single or multidimensional or indexed or associative array,into JSON format Using php function json_encode().It’s mostly used when we have create API in PHP to transfer data form one…
-
Fetch wordpress categories.
Read more: Fetch wordpress categories.Fetch wordpress categories. Now Days WordPress is a popular blogging platform which have many inbuilt functions.For fetching wordpress categories, wordpress provide lots of inbuilt functions like get_categories(), wp_list_categories(), wp_dropdown_categories(). A. get_categories() Using This function we can fetch wordpress categories. Fetching categories in string format. <?php get_categories(style=list&hide_empty=1); ?> Fetching categories in object format. <?php $options =…
-
Remove wordpress menu and logo from admin panel.
Read more: Remove wordpress menu and logo from admin panel.Remove wordpress menu and logo from admin panel. Using this Simple Hook We can easily remove wordpress logo and related sub menus to wordpress logo from admin panel bar of WordPress,You Just need to do is just copy this hook and paste below code on the function.php file of your theme. Before: add_action(‘admin_bar_menu’, ‘remove_wordpress_logo’, 999);…
-
Ajax login WordPress.
Read more: Ajax login WordPress.Sometime we need to login in site without reloading the page.so we simply use ajax for it. first we add login form in html than register a ajax path and than use jquery execute process. 1. Form Html using wp_footer hook # add ajax login form to page add_action( ‘wp_footer’, ‘CustomLoginHtml’ ); function CustomLoginHtml() {…
-
Cron Job WordPress (WP-Cron)
Read more: Cron Job WordPress (WP-Cron)Cron Job WordPress (WP-Cron) What Is WordPress Cron Job? WordPress Cron Job is how WordPress handles scheduling time-based tasks in WordPress.“Cron” Means the cron time-based task scheduling system which is available on UNIX systems. A WordPress CRON job is a task or action which is scheduled to run automatically at specific intervals. To simplify scheduling…