'localhost/bugsy' is the local directory of the website inside the wamp folder
npm i browser-sync
$ browser-sync start --proxy 'localhost/bugsy' --files '**/*' --no-notify
| <h3>Leave a Review</h3> | |
| <label> Name | |
| [text* your-name autocomplete:name] </label> | |
| <b>Rating</b> [radio review-radio default:1 "5" "4" "3" "2" "1"] | |
| <label> Your Review | |
| [textarea* your-review x4]</label> | |
| [dscf7captcha dscf7captcha-205] |
| Open a Command Prompt. | |
| Go to the folder with the cd command (eg.: cd "path of your folder"). | |
| Open a powershell by typing: powershell | |
| Then input this: get-childitem *.mp3 | foreach {rename-item $_ $_.name.replace(" ","")} |
| <script> | |
| jQuery(function() { | |
| jQuery('.video-container').on('click', function(e) { | |
| e.preventDefault(); | |
| var iframe = j(this).find('iframe'); | |
| var url = iframe.attr('data-src'); | |
| var srcValue = iframe.attr('src'); | |
| if(srcValue == 'about:blank') { |
| /* | |
| * Register custom meta box on custom post type to show in wp rest api | |
| * | |
| * Custom post type must support 'custom-fields' and have the 'show_in_rest' parameter set to true | |
| */ | |
| //Custom post type is 'audio' and custom meta box is 'cloud_url' | |
| add_action( 'rest_api_init', function () { | |
| register_rest_field( 'audio', 'cloud_url', array( |
| <?php | |
| /*Add CTA Wp Bakery Component*/ | |
| class VcHubspotCta extends WPBakeryShortCode { | |
| function __construct() { | |
| add_action( 'init', array( $this, 'create_shortcode' ), 999 ); | |
| add_shortcode( 'vc_hubspot_cta', array( $this, 'render_shortcode' ) ); | |
| } |
| /* | |
| * Send Notification if a CF7 Form fails | |
| */ | |
| function cf7_error_notifications() { ?> | |
| <script type="text/javascript"> | |
| document.addEventListener( 'wpcf7mailfailed', function( event ) { | |
| <?php | |
| wp_mail( '[email protected]', 'Form Failed', 'CF7 Form failed to send', array('Content-Type: text/html; charset=UTF-8')); | |
| ?> |
| function run_function_with_cf7_data($WPCF7_ContactForm) { | |
| $submission = WPCF7_Submission::get_instance(); | |
| if ( $submission ) { | |
| // $posted_data = $submission->get_posted_data(); | |
| $email = $submission->get_posted_data('your-email'); | |
| ob_start(); |
| //Add to functions.php | |
| <?php | |
| function add_number_of_cart_items() { | |
| global $woocommerce; | |
| $cart_count = $woocommerce->cart->cart_contents_count; | |
| ?> | |
| <script> | |
| var cartCount = <?php echo $cart_count; ?>; | |
| var node = document.createElement("span"); |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>AlphaStar</title> | |
| <link href="https://fonts.googleapis.com/css?family=Montserrat:400,400i,600,700,900" rel="stylesheet"> | |
| <link rel="stylesheet" href="css/normalize.css"> | |
| <link rel="stylesheet" href="css/style.css"> </head> |