Reusable Custom Blocks

Video Testimonial Slider

Copy and paste this code to the custom block. <?php /** Block Name: Testimonial Slider ** Author Name: MonLigan * */ $args = array( ‘post_type’ => ‘testimonial’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘order’ => ‘ASC’, ); ?> <style> .testimonial_content video{ width: 941px; height: 461px; } /* DOTS */ .testimonial-slider .slick-dots li button { cursor:pointer; […]

Issues

Gutenberg new update Issue

I am writing to provide an overview and analysis of the challenges encountered due to the recent Gutenberg update and its impact on our BlockBase theme. The update, intended to enhance functionality and user experience, has unfortunately led to several issues within our theme, affecting its performance and usability. Overview of Issues: Proposed Actions: Immediate Solution: Conclusion: […]

PHP Code Snippets/Functions

Learndash Extract User details

Please paste this code into the functions.php file and then copy the shortcode [learndash_user_courses] onto a blank page. This will display users’ details alongside their enrolled courses, groups, specific roles, and other relevant information. // List of Users function display_users_enrolled_courses() { // Initialize the output buffer ob_start(); // Get all users $users = get_users(); foreach […]

Reusable Custom Blocks

Custom Banner Slider

To create a custom Banner Slider, please follow these steps and instructions. Note: You may modify this to suit the design and theme of your site. Insert this code into the functions.php wp_enqueue_style( ‘slick-css’, ‘https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.css’ ); wp_enqueue_script( ‘slick-js’, ‘https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js’); Insert this code into the Custom Block. Note: You may modify this code to suit the […]

PHP Code Snippets/Functions Reusable Custom Blocks

Retrieving Product Variations.

<?php if (wc_get_product(get_the_ID())) { $product = wc_get_product(get_the_ID()); $html = “<ul class=’price-list’>”; $htmlRfq = “<div class=’rfq-variations’>”; $attributesList = array(); $rfqDisplayed = false; if ($product->is_type(‘variable’)) { $vars = $product->get_available_variations(); for ($i = 0; $i < count($vars); $i++) { $display_price = $vars[$i][‘display_price’]; if ($display_price == ‘0’ && !$rfqDisplayed) { $htmlRfq .= “<div class=’single-rfq’> > ” . str_lreplace(‘-‘, ‘ […]

PHP Code Snippets/Functions

Remove a specific menu from the ‘My Account’ page.

Insert this code into functions.php add_filter( ‘woocommerce_account_menu_items’, ‘misha_remove_my_account_links’ ); function misha_remove_my_account_links( $menu_links ){ unset( $menu_links[ ‘edit-address’ ] ); // Addresses unset( $menu_links[ ‘dashboard’ ] ); // Remove Dashboard unset( $menu_links[ ‘payment-methods’ ] ); // Remove Payment Methods unset( $menu_links[ ‘orders’ ] ); // Remove Orders unset( $menu_links[ ‘downloads’ ] ); // Disable Downloads unset( $menu_links[ […]