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
| Extending Gutenberg With SlotFill and Filters | |
| https://10up.com/blog/2019/extending-gutenberg-with-slotfill/ | |
| Add a custom sidebar panel to Gutenberg | |
| https://richardtape.com/2018/10/05/add-a-custom-sidebar-panel-to-gutenberg/ | |
| How to create a custom block for gutenberg | |
| https://organicthemes.com/create-custom-block-wordpress-gutenberg/ | |
| Writing a wrapper block for Gutenberg in WordPress |
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
| /* | |
| * Replace all SVG images with inline SVG | |
| */ | |
| jQuery('img.svg').each(function(){ | |
| var $img = jQuery(this); | |
| var imgID = $img.attr('id'); | |
| var imgClass = $img.attr('class'); | |
| var imgURL = $img.attr('src'); | |
| jQuery.get(imgURL, function(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
| - MOVED - | |
| Can now be found in a repository incl. license, readme, styles and plugin php file: https://github.com/franz-josef-kaiser/Easy-Pagination-Deamon |
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 $args = array( | |
| 'parent' => 2, | |
| 'post_type' => 'page', | |
| 'post_status' => 'publish' | |
| ); | |
| $pricePages = get_pages($args); | |
| foreach ($pricePages as $pricePage) { | |
| $html = "<div class='price__table price__table--".$pricePage->post_name."' id='".$pricePage->post_name."'>"; | |
| $html = $html."<div class='price__thead'>"; |
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 if ( has_nav_menu( 'primary' ) ) : ?> | |
| <button id="menu-toggle" class="menu-toggle" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"><?php _e( '<i class="fa fa-bars fa-2x"></i>', 'wyspanasion' ); ?></button> | |
| <div id="site-header-menu" class="site-header-menu"> | |
| <?php if ( has_nav_menu( 'primary' ) ) : ?> | |
| <nav class="navbar navbar-expand-lg navbar-light bg-light"> | |
| <div class="collapse navbar-collapse" id="navbarNavAltMarkup"> | |
| <div class="navbar-nav"> | |
| <li class="nav-item active"> | |
| <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> |
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
| .open > .dropdown-menu { | |
| background-color: #fff; | |
| display: block; | |
| height: auto; | |
| position: fixed; | |
| top: 35px; | |
| width: 100vw; | |
| left: 0px; | |
| } |
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 acf_orphans($value, $post_id, $field) { | |
| if ( class_exists( 'iworks_orphan' ) ) { | |
| $orphan = new \iworks_orphan(); | |
| $value = $orphan->replace( $value ); | |
| } | |
| return $value; | |
| } | |
| add_filter('acf/format_value/type=textarea', 'acf_orphans', 10, 3); | |
| add_filter('acf/format_value/type=wysiwyg', 'acf_orphans', 10, 3); |
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 | |
| $part_category = get_sub_field('kategoria_id'); // This HAS to be a string value. Make sure that it's not an array or term object. | |
| $args = array( | |
| 'post_type' => 'post', | |
| 'posts_per_page' => 1, //fetches ALL posts without limit | |
| 'order' => 'ASC', | |
| 'tax_query' => array( | |
| array( | |
| 'taxonomy' => 'category', // If you're using a custom taxonomy this needs to be changed | |
| 'terms' => array($part_category[0]), |
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
| add_filter( 'woocommerce_localisation_address_formats', 'woocommerce_custom_address_format', 20 ); | |
| function woocommerce_custom_address_format( $formats ) { | |
| $formats[ 'US' ] = "{company}\n{name}\n{address_1}\n{address_2}\n{city}, {state_code} {postcode}\n{country}"; | |
| return $formats; | |
| } |
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 my_custom_available_payment_gateways( $gateways ) { | |
| $chosen_shipping_rates = WC()->session->get( 'chosen_shipping_methods' ); | |
| // When 'local delivery' has been chosen as shipping rate | |
| if ( in_array( 'flexible_shipping_10_2', $chosen_shipping_rates ) ) : | |
| // Remove bank transfer payment gateway | |
| unset( $gateways['bacs'] ); | |
| endif; | |
| return $gateways; |
NewerOlder