-
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.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 = acos($miles); $miles = rad2deg($miles); $result[‘miles’] = $miles * 60 *…
-
Convert PHP Array into JavaScript Array.
Read more: 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 server to other server because data…
-
Fetch wordpress categories.
Read more: 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 = array(‘style’ => ‘list’,’hide_empty’…
-
Remove wordpress menu and logo from admin panel.
Read more: 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); function remove_wordpress_logo( $admin_bar ) { $admin_bar->remove_node(‘wp-logo’); } After:…
-
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)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 tasks, WordPress Cron Scheduling…
-
Add/Update Extra Html Field And Extra Product Meta Fields In Dokan
Read more: Add/Update Extra Html Field And Extra Product Meta Fields In DokanHow To Add New Html Field On Add/Update Product Form? How To Add/Update Value Of Custom Added Html Field Into Product Meta? DOKAN is no doubt the best front end multi-vendor marketplace on WordPress, powered by WooCommerce.Dokan is the fastest way to start eCommerce and earn through commissions with products ranging from digital, physical to…
-
WooCommerce : Customize Woocommerce Settings Tab.
Read more: WooCommerce : Customize Woocommerce Settings Tab.WooCommerce is the more powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there’s an API for nearly everything.There are almost Hooks and filters For Every Customization work. Let’s talk about customizing Woocommerce Admin setting Tabs.To hide a specific Woocommerce setting tab or want to customize the Woocommerce setting tabs, not the…