A new plugin to import posts from facebook groups

Often I get frustrated with facebook groups. Lots of good and active groups are there like PHPXPerts, WordPressians, Advanced WP and lots of questions gets posted over there and answers too. But everyone knows, facebook search sucks big time. Those questions gets in black-hole (literally) over time and it’s hard to find them when you … Continue reading A new plugin to import posts from facebook groups

Dokan – A multi-vendor e-commerce app theme is coming soon…

Update: Dokan has been released “Dokan” – an upcoming WordPress app theme for building multi-seller e-commerce store, powered by WooCommerce. Me and my team are working on this for couple of months and it’s going to be released at end of this month or in first half of February. It’s using WooCommerce as it’s backend … Continue reading Dokan – A multi-vendor e-commerce app theme is coming soon…

Wildcard search using WP_User_Query()

You can use WP_User_Query() class to fetch users by various arguments. With it’s search parameter, you can search users by these columns ‘ID’, ‘login’, ‘user_nicename’, ‘user_email’, ‘user_url’. Although you’ve to specify which columns you want perform the search. [php]$user_query = new WP_User_Query( array( ‘search’ => ‘Tareq’ ) );[/php] When searching users with the search parameter, … Continue reading Wildcard search using WP_User_Query()

WooCommerce sold out badge on products listing

Someone asked me in my facebook page that how could he add “Sold Out” badge in WooCommerce product. Well, here’s how: [php] add_action( ‘woocommerce_before_shop_loop_item_title’, function() { global $product; if ( !$product->is_in_stock() ) { echo ‘<span class="onsale soldout">Sold Out</span>’; } }); [/php] Paste this snippet in your themes functions.php and voila! Change the color as you … Continue reading WooCommerce sold out badge on products listing

Delete all transients from your WordPress multisite

Someone asked how he could delete all the transients from a WordPress multisite, as I wrote the code for him, thought to share it here for everyone 🙂 [php] if ( is_multisite() ) { global $wpdb; $all_sites = $wpdb->get_results( "SELECT * FROM $wpdb->blogs" ); if ( $all_sites ) { foreach ($all_sites as $site) { $wpdb->set_blog_id( … Continue reading Delete all transients from your WordPress multisite