Add a WooCommerce missing action hook with shortcode in Beaver Builder
Some themes or plugins remove native action hooks in WordPress / WooCommerce, however you can add them back in the layout with another action hook or shortcode insertion. Beaver Builder is missing some WooCommerce action hooks one such one is woocommerce_before_shop_loop_item_title , you can add that back to the WooCommerce loop by doing a custom…
Read MoreAdd WooCommerce Action Hook via Shortcode
Some WordPresss WooCommerce templates provided by themes or page builders may not include all the WooCommerce action hooks which may hinder your woo development as you add in more Woo featured, luckily it is possible to add in Woo hooks with shortcode. add_shortcode( ‘woohook’, function( $atts ) { $atts = shortcode_atts( array( ‘hook’ => ”,…
Read MoreImage Carousel Thumbnail Slider with SwiperJS and ACF in WordPress
Here is a guide on how to make an image carousel thumbnail slider with SwiperJS and ACF in WordPress. (I have done a similar tutorial with LightersliderJS but that library is no longer updated). Using SwiperJS, I just want to display simple thumbnails below the main image which on click/touch show the image in the…
Read MoreImage Carousel Thumbnail Slider with ACF Gallery Field in WordPress
Here is a guide on how to make an image carousel thumbnail slider with ACF in WordPress using the ACF gallery field. Lightslider, a lightweight image slider seems to fit the bill perfectly – I need it to just display simple thumbnails below the main image which on click/touch show the image in the main slide…
Read MoreAdd Product Price in WooCommerce as a Shortcode
Looking to insert a WooCommerce product price into a layout, well you can add the WooCommerce Product Price as a shortcode using the product ID as an attribute for the correct product. The code below goes into your functions.php file, the add the shortcode where you need to display the price. add_shortcode( ‘cl_product_price’, ‘cl_woo_product_price_shortcode’ );…
Read MoreChanging the Modern Tribe Events Date Format
This is some code borrowed and extended on to change the Modern Tribes Event plugins date output format to make it a bit easier on the eye than the default output. View the code on Gist. It is a shortcode [all_the_single_dates] that outputs the dates like so …. 09 – 14 September 2018 28 October…
Read MoreCreate Shortcode for the Permalink in WordPress
You can create a shortcode for the permalink in WordPress to use in a string output or more likely as a value for a link attribute, this can be handy if you can’t use PHP in a certain interface. add_shortcode( ‘my_permalink’, ‘my_permalink’ ); // The Permalink Shortcode function my_permalink() { ob_start(); the_permalink(); return ob_get_clean(); }…
Read MoreCreate Tabbed Content in WordPress with ACF Repeater and Tabslet
This tutorial walks through how to create a Tabbed content section in WordPress using Advanced Custom Fields and Tabslet. ACF (Advanced Custom Fields) Pro comes with an addon called the Repeater field which allows a user to perpetually add additional rows of data of certain custom fields to a page or post (or custom post type) in WordPress. This can be…
Read MoreAdd HTML [br] break tag to a Widget Title in WordPress
By default you can’t add HTML to a Widget Title in WordPress, such as a break tag <br>, you can get around this by adding a filter to allow shortcode to the title area…. In functions.php file in your child theme add: add_filter(‘widget_title’, ‘do_shortcode’); add_shortcode(‘br’, ‘ng_shortcode_breaktag’); function ng_shortcode_break( $attr ){ return ‘<br />’; } Now…
Read More