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
| /** | |
| * Gets RSS Image Item Link | |
| * | |
| * Place the following inside rss markup | |
| * to display the the first image of that post: | |
| * echo '<img src="' .get_first_image_url($item->get_content()). '"/>'; | |
| * | |
| */ | |
| function get_first_image_url($html) { | |
| if (preg_match('/<img.+?src="(.+?)"/', $html, $matches)) { |
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_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10); |
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_action( 'pre_get_posts', 'custom_pre_get_posts_query' ); | |
| function custom_pre_get_posts_query( $q ) { | |
| if ( ! $q->is_main_query() ) return; | |
| if ( ! $q->is_post_type_archive() ) return; | |
| if ( ! is_admin() ) { | |
| $q->set( 'tax_query', array(array( | |
| 'taxonomy' => 'product_cat', | |
| 'field' => 'slug', | |
| 'terms' => array( 'PUT YOUR CATEGORY HERE' ), // Don't display products in the membership category on the shop page . For multiple category , separate it with comma. | |
| 'operator' => 'NOT IN' |
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
| /* slider in open state */ | |
| .slider { | |
| overflow-y: hidden; | |
| max-height: 500px; /* approximate max height */ | |
| transition-property: all; | |
| transition-duration: .5s; | |
| transition-timing-function: cubic-bezier(0, 1, 0.5, 1); | |
| } |
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
| #square { | |
| width: 100%; | |
| height: 0; | |
| padding-bottom: 100%; | |
| } |
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
| .center-me { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| } |
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
| .png-image { | |
| -webkit-filter: drop-shadow(12px 12px 25px rgba(0,0,0,0.5)); | |
| filter: url(#drop-shadow); | |
| -ms-filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=12, OffY=12, Color='#444')"; | |
| filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=12, OffY=12, Color='#444')"; | |
| } |
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 Query Strings to Optimize Page Speed | |
| function _remove_query_strings_1( $src ){ | |
| $rqs = explode( '?ver', $src ); | |
| return $rqs[0]; | |
| } | |
| function _remove_query_strings_2( $src ){ | |
| $rqs = explode( '&ver', $src ); | |
| return $rqs[0]; | |
| } | |
| add_filter( 'script_loader_src', '_remove_query_strings_1', 15, 1 ); |
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 | |
| /* | |
| Plugin Name: Custom Functions for Screenpartners Bildebank | |
| */ | |
| /****************************************************** | |
| * TASK: Create LOW RES duplicates of uploaded images, * | |
| * create alternate download button for these files * | |
| * "Download Files" / "Download Low Res Files" * | |
| ******************************************************/ |