Insertng HTML and jQuery into a page that uses the Defaut template

There are 2 options: Copy the WooCommerce file into your theme, then make whatever changes you like. Since you’re using a default theme, you’d need to create a child theme. In this case, you’d copy /wp-content/plugins/woocommerce/templates/checkout/for-m-checkout.php (the whole file) into /wp-content/themes/yourchildthemename/woocommerce/checkout/form-checkout.php and do whatever you like – the child theme will also need a style.css … Read more

Adding jQuery UI elements to WordPress page

Using jquery-ui widgets requires a couple of steps. You will need to add the appropriate markup for your widget. I’ll use the slider as an example. I just created a new page and added the markup below to it in the text editor in the WordPress admin: <div id=”sample-theme-slider”></div> You’re going to have to have … Read more

Ajax form submit not working, returns 0

The action: ‘ajax_contact’ part in: var data = $form.serialize(); console.log(data); $.ajax({ url: ajax_contact.ajaxurl, dataType: ‘json’, action: ‘ajax_contact’, data: ajax_contact.data, is most likely the cause here, that your ajax request is failing. Move the action part into the data set instead. Since you’re serializing the form data, you could try to add: <input type=”hidden” name=”action” value=”ajax_contact” … Read more

FacetWP – conditionally display facet labels

Your code seems identical to FacetWP’s. The only variable I can think of is code placement. You might not be placing the code where it belongs (functions.php or a plugin). A quick fix would be adding their code to your theme’s functions.php: function fwp_add_facet_labels() { ?> <script> (function($) { $(document).on(‘facetwp-loaded’, function() { $(‘.facetwp-facet’).each(function() { var … Read more

WP Customizer compare and set a value via javascript

You’re binding changes to themeb_scheme via an anonymous callback function with the parameter value as the new setting of themeb_scheme. This should work: wp.customize( ‘themeb_scheme’, ‘themeb_footerbg’, function( themeb_scheme, themeb_footerbg ) { themeb_scheme.bind( function( value ) { if( value == ‘light’){ themeb_footerbg.set( ‘#eaeaea’ ); } else if( value == ‘dark’){ themeb_footerbg.set( ‘#323232’ ); } else { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)