Author: therichpost
-
Get multi-child parent div id jquery – jQuery trick 1
Hello to all, welcome to therichpost.com. In this post, I will tell you, Get multi-child parent div id jquery. Now I came with my best my first love in coding jQuery. I like jQuery very much. Today I am giving working example of how to Get multi-child parent div id jquery: I will come with more jquery…
Written by

-
laravel scheduler with delete query
Hello to all, welcome to therichpost.com. In this post, I will tell you, laravel scheduler with delete query. Your task schedule is defined in the app/Console/Kernel.php file’s schedule method. Laravel scheduler is the very feature of laravel which makes cron jobs easy to handle and code. Here is example working query for laravel scheduler with delete query: $schedule->call(function ()…
Written by

-
Laravel Create a custom middleware class that checks the user’s role
Hell to all, welcome to therichpost.com. In this post, I will tell you, how to Create a Laravel custom middleware class that checks the user’s role? Laravel now a days top php mvc framework. I am also learning laravel. Here we start the code for Laravel custom middleware class that checks the user’s role: 1. First, we will…
Written by

-
Wp query display woocommerce product based on category name
Hello to all, welcome to therichpost.com. In this post, I will tell you, Wp_query display woocommerce product based on category name. Here is the code for Wp_query display woocommerce product based on category name and you can this code any of your wordpress theme’s template file: <?php $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 10, ‘product_cat’…
Written by

-
Woocommerce hook to redirect user after login based on users
Hello to all, welcome to therichpost.com. In this post, I will tell you, Woocommerce hook to redirect user after login based on users. I am redirecting different users to different pages after woocommerce login based on usernames. Here is the working code for Woocommerce hook to redirect user after login based on users and you need to…
Written by

-
How to add banner image woocommerce shop page with hook?
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to add banner image woocommerce shop page with hook? I am sharing two hooks and both are working. Here is the working code for How to add banner image woocommerce shop page with hook? and you need to add this code into your…
Written by

-
Hook meaning in wordpress
Hello to all, welcome to therichpost.com. In this post, I will tell you all the simple definition of wordpress hooks. WordPress Hooks means: Hooks are the that functions, which change the working of wordpress main functions without interrupting the core files or code functions and same for wordpress plugins. Hooks are the two types: add_action…
Written by

-
Woocommerce get order total on daily basis
Hello to all, welcome to therichpost.com. In this post, I am sharing the code for, how to get Woocommerce get order total on daily basis? Woocommerce is the best e-commerce plugin for shopping websites. Here is the working code for Woocommerce get order total on daily basis: // functions.php file code function get_daily_purchases_total(){ global $wpdb; return $wpdb->get_var(…
Written by

-
How to remove image from wordpress post content?
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to remove image from wordpress post content? Here is the working code and you can add this into your wordpress theme’s any template file: $content = get_post_field(‘post_content’, $post_id); $content = preg_replace(“/<img[^>]+\>/i”, “”, $content); //or $content = get_the_content(); $content = preg_replace(“/<img[^>]+\>/i”, ” “,…
Written by

