Skip to content

Instantly share code, notes, and snippets.

View netmagik's full-sized avatar

Irina Blumenfeld netmagik

View GitHub Profile
/**
* Disable the emoji's
*/
function 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' );
// Add Async to JS deferred by Autoptimize plugin
add_filter('autoptimize_filter_js_defer','my_ao_override_defer',10,1);
function my_ao_override_defer($defer) {
return $defer."async ";
}
@netmagik
netmagik / mongodb_cheat_sheet_2022.md
Created September 11, 2022 18:26 — forked from codeSTACKr/mongodb_cheat_sheet_2022.md
MongoDB Cheat Sheet 2022
@netmagik
netmagik / Hamburger responsive menu icon with text Menu
Last active December 26, 2020 15:13
How to add text Menu next to Hamburger responsive menu icon
.responsive-menu-icon::before {
content: "\f333";
font: normal 20px/1 'dashicons';
margin: 0 auto;
text-align: center;
}
.responsive-menu-icon::after {
content: "Menu";
font-style: normal;
@netmagik
netmagik / post-grid.php
Created August 29, 2017 18:19
Customize Beaver Builder Posts Module to hide author username
<?php if ( 'columns' == $settings->layout ) : ?>
<div class="fl-post-column">
<?php endif; ?>
<div <?php $module->render_post_class(); ?> itemscope itemtype="<?php FLPostGridModule::schema_itemtype(); ?>">
<?php FLPostGridModule::schema_meta(); ?>
<?php $module->render_featured_image( 'above-title' ); ?>
<div class="fl-post-grid-text">
@netmagik
netmagik / Previous Next Post navigation in Genesis
Last active May 8, 2019 16:17
How to add Previous/Next links on single pages of custom post type in Genesis
/** Genesis Previous/Next Post Post Navigation */
add_action( 'genesis_after_entry', 'custom_prev_next_post_nav' );
function custom_prev_next_post_nav() {
if ( ! is_singular( 'portfolio' ) ) return;
echo '<div id="prev-next">';
previous_post_link( '<div class="prev-link"> %link</div>', '<span>&larr;</span>%title' );
next_post_link( '<div class="next-link"> %link</div>', '%title<span>&rarr;</span>' );
echo '</div><!-- .prev-next-navigation -->';
}
#responsive-menu-icon::after {
content: “Menü”;
font-style: normal;
text-transform: uppercase;
font-size: 2em;
padding-left: 10px;
position: relative;
top:-13px;
}
@netmagik
netmagik / enable HSTS
Last active May 22, 2017 21:43
Enable HSTS - HTTP Strict Transport Security in .htaccess
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
</IfModule>
/**
*
* Reviews Us Example
*
*/
#rating::before {
content: 'RATE US';
margin-top: 15px;
margin-right: 15px;
// Reviews Menu Actions
function register_review_menu() {
register_nav_menu('review-menu',__('Review Us Menu'));
}
add_action('init', 'register_review_menu');
// Use a hook on where you want that menu to appear. Depending on your theme or framework this section will be different.
// I include my menu at the bottom of the header section