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
| { | |
| "name": "acme/brilliant-wordpress-site", | |
| "description": "My brilliant WordPress site", | |
| "repositories":[ | |
| { | |
| "type":"composer", | |
| "url":"https://wpackagist.org", | |
| "only": [ | |
| "wpackagist-plugin/*", | |
| "wpackagist-theme/*" |
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
| // ============================================================= | |
| // REMOVE JUNK FROM WORDPRESS HEAD SECTION | |
| // ============================================================= | |
| // Remove wordpress version | |
| remove_action('wp_head', 'wp_generator'); | |
| // Remove emoji support | |
| remove_action('wp_head', 'print_emoji_detection_script', 7); | |
| remove_action('wp_print_styles', 'print_emoji_styles'); |
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
| // ============================================================= | |
| // ENQUEUE GOOGLE FONT | |
| // ============================================================= | |
| function genesis_load_google_fonts() { | |
| wp_enqueue_style( 'google-font-poppins', '//fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap', array(), 1.0); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'genesis_load_google_fonts' ); |
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
| // ========================================================================= | |
| // REMOVE PRODUCT CONTENT BASED ON CATEGORY | |
| // ========================================================================= | |
| function remove_product_content() { | |
| if ( is_product() && has_term( 'Flowers', 'product_cat' ) ) { | |
| // Remove the images | |
| remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); | |
| // For a full list of what can be removed please see woocommerce-hooks.php | |
| } | |
| } |
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 Current Shipping Method WooCommerce | |
| // ========================================================================= | |
| function get_current_shipping_method(){ | |
| $shipping_methods = WC()->session->get( 'chosen_shipping_methods' ); | |
| foreach ( $shipping_methods as $shipping_method){ | |
| echo '<div id="output" class="chosen-shipping">'; | |
| if($shipping_method === 'flat_rate:1'){ | |
| echo 'Flower sending '; | |
| } |
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 | |
| // Events | |
| function custom_post_type_event() { | |
| $post_type_slug = 'event'; | |
| $post_type_name = ucfirst($post_type_slug); | |
| register_post_type($post_type_slug, array( | |
| 'public' => true, | |
| 'show_in_rest' => true, | |
| 'has_archive' => true, |
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 | |
| // Order by ACF datepicker | |
| $args = new WP_Query(array( | |
| 'post_type' => 'event', | |
| 'meta_key' => 'event_date', | |
| 'orderby' => 'meta_value_num', | |
| 'order' => 'ASC', | |
| 'meta_query' => array( | |
| array( | |
| 'key' => 'event_date', |
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 custom_post_types() { | |
| // Events | |
| register_post_type('event', array( | |
| 'public' => true, | |
| 'capability_type' => 'event', | |
| 'map_meta_cap' => true, | |
| 'show_in_rest' => true, | |
| 'has_archive' => true, |
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 | |
| // ========================================================================= | |
| // MINIMUM CART AMOUNT FOR SPECIFIC CATEGORY IN WOOCOMMERCE | |
| // ========================================================================= | |
| function minimum_order_amount_for_subcategories() { | |
| $term_slug = 'kiegeszitok'; // <== Define the targeted main product category slug | |
| $term_name = 'Kiegészítők'; // <== Define the targeted main product category slug | |
| $threshold_huf = 5000; // <== Define the minimum amount in HUF | |
| $threshold_eur = 14; // <== Define the minimum amount in EUR |