Category Archives: Wordpress

Useful WP_Query example in WordPress

// 1 Get Sticky post record by wp_query post__in and taxonomy tax_query parameter # ‘; ?>   // 2 Get posts exclude Sticky posts by wp_query post__not_in and taxonomy tax_query parameter # // 3 Exclude specific Category Posts from result by use wp_query operator NOT IN # // 4 WP_Query for fetch CPT event Order… Read More »

Error in xml sitemap with yoast seo plugin WordPress

Like today our WordPress Developer team fetch issue in one of our client’s leading wordpress site as XML sitemap generated by WordPress Yoast SEO plugin not work well and on hit sitemap page url it show error like below instead of well form xml sitemap feed. This page contains the following errors: error on line… Read More »

Exclude Posts Pages or Specific Post from Search Result in WordPress

Hello WordPress Developer Sometime you may have requirement or your client requested to exclude specific post, page fro WOrdpress search result or completely Exclude Posts or Pages or Custom post type records from search result and display search records only records from specific post type like Posts or Pages or CPT than you can achieve… Read More »

WooCommerce set minimum cart value limit and add surcharge if Cart value low

In WooCommerce base online shopping site Some time you or your client would like to set minimum cart value, and add additional surcharge in Cart total if Customer Cart value ( sum of added Item into cart ) is  not equal more than minimum limit. # add_action( ‘woocommerce_cart_calculate_fees’,’ls_woocommerce_custom_surcharge’ ); function ls_woocommerce_custom_surcharge() { global $woocommerce; if… Read More »

How to hide PHP Warnings and Notices in WordPress

We Developer many time fetch problem with warning message that display on front end site. Warning is like notification and completely different than Errors. Error stop page from rendering in browser while warning not cause issue in script execution but display message with message with prefix WARNING :. So in most of cases of Warning… Read More »

Jetpack auto tweet post with custom message and hash tag

Jetpack is very powerful plugin in Worpdress and offering number of features functionality. one of them best useful is Auto share post on social media site. when ever you publish new post it automatically share to all social media accounts that you connected with your website from Wp-admin >> Settings >> Sharing (Only link available… Read More »

Display CPT News in Group of 3 using shortcode WordPress

Display record in group of specific count is some time difficult while you are going to display it with blockquote, ul etc Tag instead of simple Div tag. because in this case it is required that Opening tag must be closed to display it in well format without miss configured it structure. In Below example… Read More »

Custom post type in WordPress

Custom Post Type (CPT) in wordpress is very interesting facts to achieve what ever you want to implement in your website that developed base on WordPress Platform. instead of adding your specific category in default wordpress post type you may create your own custom post type and display it with SEO friendly url with category… Read More »