Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Taras Dashkevych dashkevych

🤓
View GitHub Profile
View gist:3d0f4518ee2ed21f7f23a9ae2fb8de94
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;
}
View gist:9e0d4e72a5402395271cc40aadff32e6
<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 Nov 25, 2017
Fix: Minor display issues in IE 11
View ie-fixes.css
/* 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 Aug 6, 2021
Creating "Back to Top" button in WordPress.
View back-to-top.js
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 Sep 10, 2017
Disable Emojis in WordPress
View disable-emojis.php
/**
* 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' );