This file contains hidden or 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_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_home_url_slash' ); | |
| function yoast_seo_canonical_change_home_url_slash( $canonical_url ) { | |
| $re = '/\/page\/\d+\//m'; | |
| $str = $canonical_url; | |
| $subst = '/'; | |
| $result = preg_replace($re, $subst, $str); | |
| return $result; | |
| } |
This file contains hidden or 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 | |
| add_action('do_feed', 'itsme_disable_feed', 1); | |
| add_action('do_feed_rdf', 'itsme_disable_feed', 1); | |
| add_action('do_feed_rss', 'itsme_disable_feed', 1); | |
| add_action('do_feed_rss2', 'itsme_disable_feed', 1); | |
| add_action('do_feed_atom', 'itsme_disable_feed', 1); | |
| add_action('do_feed_rss2_comments', 'itsme_disable_feed', 1); | |
| add_action('do_feed_atom_comments', 'itsme_disable_feed', 1); | |
| remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
| remove_action( 'wp_head', 'feed_links', 2 ); |
This file contains hidden or 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 | |
| $cur_cat = get_term_by('id', get_query_var('cat'), 'category'); | |
| ?> | |
| <script type="application/ld+json"> | |
| { | |
| "@context": "http://schema.org", | |
| "@type": "BreadcrumbList", | |
| "itemListElement": | |
| [ |
This file contains hidden or 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
| // catalog/controller/product/manufacturer.php | |
| // start | |
| if ($manufacturer_info['meta_title'] && mb_strtolower($manufacturer_info['meta_title']) != mb_strtolower($manufacturer_info['name'])) { | |
| $this->document->setTitle($manufacturer_info['meta_title']); | |
| } else { | |
| $productTitle = $manufacturer_info['name'] . ' в Украине и Киеве купить в интернет магазине — Choco-Yummy'; | |
| $this->document->setTitle($productTitle); | |
| } | |
| if($manufacturer_info['meta_description'] && strlen($manufacturer_info['meta_description']) > 60) { | |
| $this->document->setDescription($manufacturer_info['meta_description']); |
This file contains hidden or 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 | |
| // don't forget: $this->load->model('catalog/manufacturer'); | |
| $pageNumber = ''; | |
| if (isset($this->request->get['page'])) { | |
| $pageNumber = ' - Страница ' . $this->request->get['page']; | |
| } | |
| if(isset($this->request->get['mfp'])) { // get manufacturer name | |
| $filterMega = $this->request->get['mfp']; | |
| $filterMegaName = ''; |
This file contains hidden or 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 wrong_url_redirect($url) { | |
| global $wp; | |
| if(!get_query_var('paged') && !empty($url) && !is_front_page() && $url != home_url($wp->request . '/' ) && !is_search()) { | |
| wp_safe_redirect( $url, 301 ); | |
| exit; | |
| } | |
| return $url; | |
| } | |
| add_filter( 'wpseo_canonical', 'wrong_url_redirect' ); |
This file contains hidden or 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
| <div class="textarea-lineup"><span></span></div> | |
| <script> | |
| colorScale($('.textarea-lineup'), 10); | |
| </script> |
This file contains hidden or 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 | |
| add_filter('woocommerce_dropdown_variation_attribute_options_args', 'my_change_choose_an_option_text_func', 10, 2); | |
| function my_change_choose_an_option_text_func($args){ | |
| if($args['attribute'] == 'pa_tsvet') { | |
| $args['show_option_none'] = 'Выбрать цвет'; | |
| } | |
| return $args; | |
| } |
This file contains hidden or 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
| var url = 'artzm.space'; | |
| var url = (!url.match(/^[a-zA-Z]+:\/\//)) ? 'http://' + url : url; | |
| // Google Page Speed | |
| jQuery.ajax({ | |
| url: "https://www.googleapis.com/pagespeedonline/v5/runPagespeed", | |
| type: "GET", | |
| data: { | |
| "strategy": "desktop", // or mobile | |
| "fields": "lighthouseResult/categories/*/score", |
This file contains hidden or 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 | |
| function yourstheme_menu_link_attributes( $args ) { | |
| global $wp; | |
| $current_url = untrailingslashit(add_query_arg( $_SERVER['QUERY_STRING'], '', home_url( $wp->request ) ) ); | |
| $href = untrailingslashit( $args['href']); | |
| if($current_url == $href){ | |
| $args['href'] = ''; | |
| } | |
| return $args; |