Filter portforlio with librairie isotop
Filter portforlio with librairie isotop
Filter portforlio with librairie isotop
All sorted. My theme actually had a section for custom javascript in the theme options. I added the code there and used the enqueue for the bootstrap – all working fine now.
Perhaps you could either use admin ajax or the WP REST API to send a request to the server for the user meta update. If you have a look at the WP documentation (links above) or similar questions here on WPSE, you can find examples on how to do it. Update user meta with ajax … Read more
Solution: add an action on the tag vc_edit_form_fields_after_render. add_action( ‘vc_edit_form_fields_after_render’, function() { echo ‘<script src=”‘ . AN_URL . ‘test.js”></script>’; // Or something other }, 9 ); In the functions.php or equivalent. (Indeed, the tag vc_edit_form_fields_after_render is used by do_action( ‘vc_edit_form_fields_after_render’ ) which is located in js_composer\include\classes\editors\class-vc-edit-form-fields.php . So what you type in your add_action callable … Read more
This might help you. add_action(‘wp_footer’, ‘insert_my_js_to_footer’); function insert_my_js_to_footer(){ ?> <script> // your script here. </script> <?php }; UPDATE: And if you want to append the php file itself then you can try this. add_action(‘wp_footer’, ‘insert_php_file_to_footer’); function insert_php_file_to_footer(){ include( ‘your-php-file.php’ ); };
This function in /themes/lucid-press-child/js/custom-js.js is your problem. function homepageNavigationClasses(){ if(jQuery(‘body.home’).length){ //jQuery(‘#navigation a’).not(‘.sub-menu a’).click(function(event){ jQuery(‘#navigation a’).click(function(event){ var clickedLink = jQuery(this).text(); clickedLink = clickedLink.replace(/\s/g,”); if(!jQuery(this).parent().hasClass(‘page’)){ event.preventDefault(); //console.log(clickedLink); jQuery(‘html, body’).animate({ scrollTop: jQuery(“#”+clickedLink).offset().top – 400 }, 500); jQuery(‘#navigation li’).removeClass(‘active-hp-section’); jQuery(this).parent().addClass(‘active-hp-section’); } }); } } It’s looking for a ID to scroll the page too but it doesn’t have one … Read more
1- First you have to make a child theme of your current theme. 2- Then, in your child theme create a functions.php file 3- Create a js folder and put fitty.min.js inside it and create a child.js file also inside this js folder 4- In functions.php of your child theme add the following : <?php … Read more
To display only assigned category you need to change hide_empty to true. Please see the modified code: $args = array( ‘hierarchical’ => 1, ‘show_option_none’ => ”, ‘hide_empty’ => true, ‘parent’ => 134, ‘taxonomy’ => ‘product_cat’ ); $subcats = get_categories($args); echo ‘<ul class=”wooc_sclist”>’; foreach ($subcats as $sc) { $link = get_term_link( $sc->slug, $sc->taxonomy ); echo ‘<li><a … Read more
Show the subcategory name based on current product
WordPress Gutenberg Ajax request