Create an ACF Repeater Loop of Bootstrap Modals in WordPress

Foreach Loop Bootsrap Modals

Create a while loop of Bootstrap Modals with an ACF Repeater field in WordPress. Create the ACF Repeater fields.   You can create as many fields as needed, this example uses 3 basic fields, assign the field group to a post or page and populate the repeater rows. Add the ACF Loop Code View the…

Read More

Creating a loop of Bootstrap Modals

Foreach Loop Bootsrap Modals

To create a loop of Bootstrap style modals on a page, you can use a foreach or while loop in PHP. First, let’s do the code for one modal. Single Modal Code <!– Button to Open the Modal –> <button type=”button” class=”btn btn-primary” data-toggle=”modal” data-target=”#myModal”> Open modal </button> <!– The Modal –> <div class=”modal” id=”myModal”>…

Read More

Set up WordPress Code Standards phpcs on VS Code on macOS

atom-codesniffer-wpcs

Here is a guide on how to get WordPress code standards using  PHPCodesniffer on Visual Studio Code text editor using the WordPress code standards, this will be done via adding PHPCodesniffer via Composer, you can also add PHPCodesniffer via Pear or Homebrew, I used to have it running via Pear but have found it to be not as reliable…

Read More

Set a Minimum Subscription Period in WooCommerce Subscriptions

Woocommerce Minimum Subscription

WooCommerce Subscriptions currently doesn’t allow a minimum subscription time period when setting up a subscription, nut you can manipulate the WooCommerce Subscription  Sign-up fee and free trial fields to allow you to do so. Let’s say you want a minimum 3 month sign up period which then defaults to monthly after the 3 months is…

Read More

Add Extra Tabs on WooCommerce Products

Woocommerce Extra Product Tabs

WooCommerce allows you to add extra tabs on a product page alongside description, reviews and additional information with the filter, woocommerce_product_tabs. Let’s say you wanted 2 extra tabs – ‘Ingredients’ and ‘How To Use’ as the heading, you can use the filter woocommerce_product_tabs like so… add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); /** * Add 2 custom product…

Read More

Add Navigation Arrows in WooCommerce Product Gallery Slider

Woocomerce Navigation Arrows

You can add Navigation Arrows in WooCommerce Product Gallery by adding a filter and then some CSS. WooCommerce uses a slider called Flexslider and it has a few more configurable options. In functions.php add add_filter( ‘woocommerce_single_product_carousel_options’, ‘sf_update_woo_flexslider_options’ ); /** * Filer WooCommerce Flexslider options – Add Navigation Arrows */ function sf_update_woo_flexslider_options( $options ) { $options[‘directionNav’]…

Read More