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
| import React, { useState, useEffect } from "react"; | |
| import { __ } from "@wordpress/i18n"; | |
| import "./index.scss"; | |
| const index = (props) => { | |
| let frame; | |
| const [logo, setLogo] = useState({}); | |
| useEffect(() => { |
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 | |
| class Arr { | |
| /** | |
| * Taken from Illuminate\Support\Arr (Laravel Framework) | |
| */ | |
| /** | |
| * Check if an item or items exist in an array using "dot" notation. | |
| * |
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 | |
| function page_data() { | |
| global $post; | |
| $used_section = []; | |
| $data = (get_metadata( 'post', $post->ID, '_elementor_data' )); | |
| if( empty($data) ) { | |
| $data = []; | |
| }else { |
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
| <form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
| <select name="category_name"> | |
| <option value="">Select your theme</option> | |
| <?php $documentation_categories = get_terms( 'category' ); if(! empty( $documentation_categories ) && ! is_wp_error( $documentation_categories )) : foreach($documentation_categories as $documentation_category) : ?> | |
| <option value="<?php echo $documentation_category->slug; ?>"><?php echo $documentation_category->name; ?></option> | |
| <?php endforeach; endif; ?> | |
| </select> | |
| <input type="search" value="<?php echo get_search_query(); ?>" name="s" placeholder="& Type keywords"> |
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 | |
| /* *********************** | |
| (1) Shop URL | |
| **************************/ | |
| $shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) ); | |
| /* *********************** |
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 | |
| /* | |
| * Hide "Products" in WooCommerce breadcrumb | |
| */ | |
| function woo_custom_filter_breadcrumbs_trail ( $trail ) { | |
| foreach ( $trail as $k => $v ) { | |
| if ( strtolower( strip_tags( $v ) ) == 'products' ) { | |
| unset( $trail[$k] ); | |
| break; |
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 | |
| /* | |
| * goes in theme functions.php or a custom plugin. Replace the image filename/path with your own 🙂 | |
| * | |
| **/ | |
| add_action( 'init', 'custom_fix_thumbnail' ); | |
| function custom_fix_thumbnail() { | |
| add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); |