This file contains 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_login_stylesheet() | |
{ | |
wp_enqueue_style('custom-login', get_stylesheet_directory_uri() . '/style-login.css'); | |
} | |
add_action('login_enqueue_scripts', 'my_login_stylesheet'); | |
function my_login_logo_url() | |
{ |
This file contains 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 wp_nav_menu_no_current_link($atts, $item, $args, $depth) | |
{ | |
if ($item->current) $atts['href'] = ''; | |
return $atts; | |
} | |
add_filter('nav_menu_link_attributes', 'wp_nav_menu_no_current_link', 10, 4); |
This file contains 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
// add canonical category paged | |
function yoast_seo_canonical_change_woocom_shop($canonical) | |
{ | |
if (is_paged() && is_category()) { | |
$category = get_queried_object(); | |
$category_link = get_category_link($category); | |
$canonical = esc_url($category_link); | |
} | |
return $canonical; |
This file contains 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
//** Speed Up Wordpress **/ | |
remove_action('wp_head','wp_generator'); | |
remove_action('wp_head','wlwmanifest_link'); | |
remove_action('wp_head','wp_resource_hints', 2); | |
remove_action('wp_head','wlwmanifest_link'); | |
remove_action('wp_head','rsd_link'); | |
remove_action('wp_head','rel_canonical'); | |
remove_action('wp_head','wp_site_icon'); | |
remove_action('wp_head','wp_oembed_add_discovery_links' ); | |
remove_action('wp_head','wp_oembed_add_host_js' ); |
This file contains 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 if (current_user_can('editor') || current_user_can('administrator')) { ?> | |
<?php } ?> |
This file contains 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
//get edit link | |
function get_edit() | |
{ | |
if (current_user_can('editor') || current_user_can('administrator')) { | |
echo '<a target="_blank" href="' . get_edit_post_link(get_the_ID()) . '" class="edit-post-link dashicons dashicons-edit" title="Edit project"></a>'; | |
} | |
} |
This file contains 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
//remove emoji support | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
// Remove rss feed links | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); | |
// remove wp-embed | |
add_action( 'wp_footer', function(){ |
This file contains 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
<script> | |
(function(dl) { | |
function pushData(eventName, userName, userPhone) { | |
dl.push({ | |
'event': eventName, | |
'name': userName, | |
'phone': userPhone | |
}) | |
} |
This file contains 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
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'page_title' => 'Настройки темы', | |
'menu_title' => 'Настройки темы', | |
'menu_slug' => 'theme-general-settings', | |
'capability' => 'edit_posts', | |
'redirect' => false | |
)); |
This file contains 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 filter_wpseo_breadcrumb_separator($this_options_breadcrumbs_sep) | |
{ | |
return '<img class="separ" src="/wp-content/uploads/2021/10/icon.svg">'; | |
}; | |
// add the filter | |
add_filter('wpseo_breadcrumb_separator', 'filter_wpseo_breadcrumb_separator', 10, 1); |
NewerOlder