Wordpress

How to create your own WordPress shortcode

Added below code to your function.php file of your active child theme (or theme). add_shortcode(‘display_shortcode’,’my_shortcode’); function my_shortcode() { echo “hello world”; // write here your html code what ever you display } Added below code in your php file where you display this shortcode: or Added below code if you want to use this shorcode […]

How to use Widget as Shortcode in WordPress Page, Post

function widget($atts) { global $wp_widget_factory; extract(shortcode_atts(array( ‘widget_name’ => FALSE, ‘instance’ => ” ), $atts)); $widget_name = esc_html($widget_name); if (!is_a($wp_widget_factory->widgets[$widget_name], ‘WP_Widget’)): $wp_class = ‘WP_Widget_’.ucwords(strtolower($class)); if (!is_a($wp_widget_factory->widgets[$wp_class], ‘WP_Widget’)): return ”.sprintf(__(“%s: Widget class not found. Make sure this widget exists and the class name is correct”),”.$class.”).”; else: $class = $wp_class; endif; endif; ob_start(); the_widget($widget_name, $instance, array(‘widget_id’=>’arbitrary-instance-‘.$id, ‘before_widget’ =>

WooCommerce Setup Shipping Rates and Free Shipping for Specific Order Amount

In WooCommerce looking for setup Shipping charge like if Order amount less than specific amount than apply Shipping charge else Free Shipping ? For example: “For Orders amount up to $100, Shipping charge $5; for orders above $100, Free Shipping”. Like this possible without using any WooCommerce Shipping plugin? Well, the answer is yes! Follow

Exclude particular category products from shop and Category archive page

Looking solution for Exclude particular category products from display on shop and Category archive page ? In following example you will get idea how you able to hide particular category products from not display on WooCommerce Shop and Category archive page. To Hide Specific Category products from Shop page and Product archive page add following

Scroll to Top