Skip to content

Instantly share code, notes, and snippets.

View RiodeJaneiroo's full-sized avatar
🎯
Focusing

Vadim Zmiievskyi RiodeJaneiroo

🎯
Focusing
  • Ukraine
View GitHub Profile
@RiodeJaneiroo
RiodeJaneiroo / functions.php
Last active December 25, 2019 18:43
[add button to tinymce]
<?php
add_action( 'after_setup_theme', 'mythemeslug_theme_setup' );
if ( ! function_exists( 'mythemeslug_theme_setup' ) ) {
function mythemeslug_theme_setup(){
/********* Registers an editor stylesheet for the theme ***********/
add_action( 'admin_init', 'mythemeslug_theme_add_editor_styles' );
/********* TinyMCE Buttons ***********/
add_action( 'init', 'mythemeslug_buttons' );
}
@RiodeJaneiroo
RiodeJaneiroo / .htaccess
Created June 14, 2020 14:30
[Редирект без слеша на слеш] #slash #seo #php
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteCond %{REQUEST_URI} !.xml$
RewriteRule ^(.*[^/])$ $1/ [L,R=301]
@RiodeJaneiroo
RiodeJaneiroo / functions.php
Created June 16, 2020 10:54
[Yoast change meta tag robots for page] #php #seo #yoast
add_filter( 'wpseo_robots', 'yoast_seo_robots_change' );
function yoast_seo_robots_change( $robots ) {
if (is_page(1496) || is_page(1496) ) {
$robots = "noindex, nofollow";
return $robots;
}
return $robots;
}
@RiodeJaneiroo
RiodeJaneiroo / index.html
Created January 9, 2021 13:50
[Hambureger menu SVG] #css
<button class="btn btn__toggle">
<svg class="ham" viewBox="0 0 100 100" onclick="this.classList.toggle('active')">
<path class="ham__line top" d="m 70,33 h -40 c 0,0 -6,1.368796 -6,8.5 0,7.131204 6,8.5013 6,8.5013 l 20,-0.0013" />
<path class="ham__line middle" d="m 70,50 h -40" />
<path class="ham__line bottom" d="m 69.575405,67.073826 h -40 c -5.592752,0 -6.873604,-9.348582 1.371031,-9.348582 8.244634,0 19.053564,21.797129 19.053564,12.274756 l 0,-40" />
</svg>
</button>