Adding Bootstraps Collapse to a Beaver Builder button and module

Bootstrap Collapse Beaver Builder

If you have the Beaver Theme as your WordPress theme, here is how you can add Bootstraps Collapse effect to a Beaver Builder row or module can be achieved using the Bootstrap data-toggle and data-target attribute. You need to have the full bootstrap enabled in the theme, not the minimal version. Let’s say you have…

Read More

Show All Loaded Scripts and Styles on a Page in WordPress

Scripts Styles On Page

To show all loaded scripts and styles on a page in WordPress you can use a foreach loop and show the name of the script as referred to as a $handle add_action( ‘wp_print_scripts’, ‘prefix_show_me_the_scripts’ ); /** * Show what Scripts and Styles are running on a page */ function prefix_show_me_the_scripts() { global $wp_scripts; global $wp_styles; echo…

Read More

Using wp_localize_script with jQuery variables including strings, booleans and integers

set a jquery value via wp-localize-script

The use of wp_localize_script is an API in WordPress is to retrieve PHP values from the database to use in javascript/jquery scripts, it can also be utilized to make string values language translatable if required, but also used to pass user defined variables/settings say from a plugin to load via a jQuery init file for a jQuery plugin. By…

Read More