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 () { | |
$("#btn").on('click', function() { | |
$('html, body').animate({ | |
scrollTop: $("#scrollToElementId").offset().top | |
}, 400); | |
}); | |
}); |
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_theme_init() { | |
register_taxonomy_for_object_type( 'post_tag', 'page' ); | |
} | |
add_action( 'init', 'my_theme_init' ); | |
function my_theme_tags_support_query( $wp_query ) { | |
if ( $wp_query->get( 'tag' ) ) { | |
$wp_query->set( 'post_type', 'any' ); |
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_theme_default_gallery_style() { | |
return false; | |
} | |
add_filter( 'use_default_gallery_style', 'my_theme_default_gallery_style' ); |
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 your_theme_styles() { | |
wp_enqueue_style( | |
'style', | |
get_stylesheet_directory_uri() . '/style.css', | |
false, | |
date( 'dmYhi', filemtime( get_stylesheet_directory() . '/style.css' ) ) | |
); | |
} |
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
.iframe-responsive-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
} | |
.iframe-responsive-container iframe { | |
position: absolute; | |
left: 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
(function ($) { | |
$(function () { | |
$('iframe').wrap("<div class='iframe-responsive-container'></div>"); | |
}); | |
})(jQuery); |
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 my_theme_init() { | |
register_taxonomy_for_object_type( 'category', 'page' ); | |
} | |
add_action( 'init', 'my_theme_init' ); |
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_theme_fix_extra_caption_padding( $atts ) { | |
if ( ! empty( $atts['width'] ) ) { | |
$atts['width'] -= 10; | |
} | |
return $atts; | |
} | |
add_filter( 'shortcode_atts_caption', 'my_theme_fix_extra_caption_padding' ); |
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 your_theme_exclude_pages_from_search( $query ) { | |
$query->set( 'post__not_in', PAGE_ID_HERE ); | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'your_theme_exclude_pages_from_search' ); |
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 | |
define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true); |