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
| // functions.php | |
| function filter_plugin_updates( $value ) { | |
| if( isset( $value->response['woocommerce/woocommerce.php'] ) ){ | |
| unset( $value->response['woocommerce/woocommerce.php'] ); | |
| } | |
| return $value; | |
| } | |
| add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' ); |
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
| // prevent to scroll dovh on reCAPTCHA click on iOS devices | |
| window.scrollCaptcha = false; | |
| var cat_id = document.querySelector('.ginput_recaptcha').id; | |
| document.getElementById(cat_id).setAttribute('data-callback','scrollFixCaptcha'); | |
| function scrollFixCaptcha(a) { if(window.scrollCaptcha) { jQuery("html, body").scrollTop(window.scrollCaptcha); } } | |
| document.addEventListener("scroll", function() { | |
| var el = document.getElementById(cat_id); | |
| var theTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; |
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 comments_number( __('No Comments', 'textdomain'), __('One Comment', 'textdomain'), __('(%) Comments', 'textdomain') ); ?> |
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 $field_name = ( get_field('field_name', 'category_'. $cat) ) ? get_field('field_name', 'category_'. $cat) : false ; ?> |
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
| // post (post-type) out of the loop | |
| <?php $field_name = ( get_field('field_name', the_ID()) ) ? get_field('field_name', the_ID()) : false ; ?> | |
| // post (post-type) in the loop | |
| <?php $field_name = ( get_field('field_name') ) ? get_field('field_name') : false ; ?> | |
| // category | |
| <?php $field_name = ( get_field('field_name', $cat) ) ? get_field('field_name', 'category_' . $cat) : false ; ?> | |
| // taxonomy ???????????? |
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
| // the 1-st way | |
| wp_deregister_style( 'style-handle' ); | |
| // the 2-nd way | |
| add_filter('style-handle', '__return_false'); | |
| // the 3-rd way | |
| function custom_dequeue() { | |
| wp_dequeue_style('style-handle'); | |
| wp_deregister_style('style-handle'); |
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
| // in footer.php or header.php | |
| <div><strong>Current template:</strong> <?php get_current_template( true ); ?></div> | |
| // in functions.php | |
| /** | |
| * Define current template file | |
| * | |
| * Create a global variable with the name of the current | |
| * theme template file being used. | |
| * |
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( 'gform_enable_field_label_visibility_settings', '__return_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
| // path to theme | |
| <?php echo get_template_directory_uri(); ?> | |
| // path to 'content' directory | |
| <?php echo content_url(); ?> |