This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### TRY | |
| ### https://gitmemory.cn/repo/nezhar/wordpress-docker-compose/issues/74 | |
| ### | |
| ### | |
| ### | |
| ### | |
| version: "3.9" | |
| services: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| /** | |
| * Get terms for this tax (cpt category) | |
| */ | |
| $term_id = null; | |
| $taxonomy = NULL; | |
| $queried_object = get_queried_object(); | |
| if ( !$queried_object == NULL && !is_search() && !is_404() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var elementNameHere = document.getElementsByClassName("classs-first-element-check"); | |
| if ( elementNameHere ) { | |
| for ( var i = 0, len = elementNameHere.length; i < len; i++ ) { | |
| console.log( len[i] ); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * https://docs.woocommerce.com/document/composite-products/composite-products-js-api-reference/ | |
| * https://wordpress.stackexchange.com/questions/342148/list-of-js-events-in-the-woocommerce-frontend | |
| */ | |
| //Woocommerce Checkout JS events | |
| $( document.body ).trigger( 'init_checkout' ); | |
| $( document.body ).trigger( 'payment_method_selected' ); | |
| $( document.body ).trigger( 'update_checkout' ); | |
| $( document.body ).trigger( 'updated_checkout' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| barba.hooks.before((data) => { | |
| const cols = document.querySelector('.site-branding'); | |
| gsap.to(cols, { | |
| autoAlpha: 0, | |
| }); | |
| }); | |
| barba.hooks.after((data) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ScrollTrigger.matchMedia({ | |
| // desktop | |
| "(min-width: 1024px)": function() { | |
| const childSplit = new SplitText('.block__slide__inner h2', { | |
| type: 'lines', | |
| linesClass: 'split-child' | |
| }); | |
| const parentSplit = new SplitText('.block__slide__inner h2', { | |
| type: "lines", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $query = new WP_Query([ | |
| // Standard query args. Using post__in can be much faster. If searching ACF custom | |
| // database tables data, plugin the found post IDs in here. | |
| 'post_type' => 'post', | |
| 'post__in' => [1,2,3], // array of post IDs | |
| // Optional args to improve performance. Use these to cut down on internal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($) { | |
| window.fwp_is_paging = false; | |
| $(document).on('facetwp-refresh', function() { | |
| if (! window.fwp_is_paging) { | |
| window.fwp_page = 1; | |
| FWP.extras.per_page = 'default'; | |
| if (FWP.loaded) { | |
| $('#pagination .container').prepend('<div class="decom-loading">Loading...</div>'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * custom CPT `faqs` with taxonomy `faq_categories` | |
| * section_faq_category is field Taxonomy with Term Object, multi select | |
| * faq counter and definitions for terms | |
| * loop taxonomy selected taxes with ACF | |
| * tax_ID, array of IDs | |
| * | |
| */ | |
| $faq_object = get_sub_field('section_faq_category'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| WordPress loop | |
| Taxonomy and Terms | |
| */ | |
| $faq_object = get_sub_field('section_faq_category'); | |
| if( $faq_object ): | |
| foreach ( $faq_object as $faq_object_single ) { | |
| $tax_id_convert = $faq_object_single->term_id; | |
| $tax_id_all[] = $tax_id_convert; |