Skip to content

Instantly share code, notes, and snippets.

View dashkevych's full-sized avatar
🤓

Taras Dashkevych dashkevych

🤓
View GitHub Profile
@dashkevych
dashkevych / gist:3d0f4518ee2ed21f7f23a9ae2fb8de94
Last active September 26, 2019 16:35
TBN: caption transfer
function tbn_update_featured_image_captions() {
$caption_counter = 1;
$is_done = get_transient( '_breakingnews_caption_transfer' );
if ( $is_done ) {
echo '<h2>==> The update process is already done <==</h2>';
return;
}
<div class="row">
<div class="col-lg-6">First Column</div>
<div class="col-lg-6">Second Column</div>
</div>
@dashkevych
dashkevych / ie-fixes.css
Created November 25, 2017 19:21
Fix: Minor display issues in IE 11
/* IE fixes */
.main-navigation li.menu-item-has-children > a:before,
.main-navigation li.page_item_has_children > a:before,
.main-navigation .sub-menu li.menu-item-has-children > a:before,
.main-navigation .children li.page_item_has_children > a:before {
display: none;
}
.main-navigation li.menu-item-has-children > a:after,
.main-navigation li.page_item_has_children > a:after {
@dashkevych
dashkevych / back-to-top.js
Last active March 7, 2023 20:30
Creating "Back to Top" button in WordPress.
jQuery( document ).ready(function($){
var offset = 100,
speed = 250,
duration = 500,
scrollButton = $('#topbutton');
$( window ).scroll( function() {
if ( $( this ).scrollTop() < offset) {
scrollButton.fadeOut( duration );
} else {
@dashkevych
dashkevych / disable-emojis.php
Created September 10, 2017 20:21
Disable Emojis in WordPress
/**
* Disable the emoji's.
*/
function themeslug_disable_emojis() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );