Add a WooCommerce missing action hook with shortcode in Beaver Builder

Add Shortcode Hook Woocommerce

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 More

Add Dot Pagination to WooCommerce Product Gallery Image Slider

Woocommerce Dot Navigation

You can add dot pagination to WooCommerce Product Gallery images by adding a filter and then some CSS. WooCommerce uses a slider called Flexslider which it has a few more configurable options. By default the product gallery navigation uses thumbnails but this can be swapped to dots by changing the ‘controlNav’ value. In functions.php add…

Read More

Change WordPress Database Table Prefix Back To wp_

Wordpress Table Prefix

Here is how to change the WordPress database tables back to the default wp_ prefix. First thing is to change the php constant table prefix in wp-config.php Change the wp-config.php constant $table_prefix = ‘wp_’; Change the table prefixes in phpMyAdmin Next open your WordPress database in phpMyadmin, select all the tables and choose the option…

Read More

Change Number of Posts Displaying on a Custom Post Type (CPT) Archive Page

Pre Get Posts Display

To change the number of posts that appear in an archive page for a custom post type you can change the number using the pre_get_posts action with some passed in parameters. Normally the number of posts displayed per page is defaulted to the setting in the Dashboard Reading Settings > Blog pages show at most –…

Read More

Hide WordPress Admin Toolbar Based On User Role

You can hide the WordPress admin toolbar to logged in users based on their user role and capabilities. First of all you can hide the toolbar on all front end pages from all users by adding to your functions.php add_filter( ‘show_admin_bar’, ‘__return_false’ ); Lets say you wanted regular subscriber users not to see the toolbar when…

Read More