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 | |
| define("THEME_DIR", get_template_directory_uri()); | |
| add_filter('show_admin_bar', '__return_false'); // отключить | |
| //add_filter('show_admin_bar', '__return_true'); // включить | |
| // Очистка WP | |
| remove_action('wp_head', 'wp_generator'); | |
| remove_action('wp_head','feed_links_extra', 3); // убирает ссылки на rss категорий | |
| remove_action('wp_head','feed_links', 2); // минус ссылки на основной rss и комментарии |
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 | |
| if(is_category()) { | |
| $category = get_query_var('cat'); | |
| $current_cat = get_category($cat); | |
| echo 'The slug is ' . $current_cat->slug; | |
| } | |
| ?> |
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 $url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' ); $url = $url['0']; ?> |
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 renderCleanCounter() | |
| { | |
| var curDate = new Date(); | |
| var counterBlock = $('#counter'); | |
| var counterResulte = Math.round((curDate.getTime() - 1429460070577) / 3000) + 23124; | |
| counterBlock.html(counterResulte); | |
| } |
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
| $term = $wp_query->queried_object; | |
| $args = array( | |
| 'post_type' => 'specialists', | |
| 'posts_per_page' => -1, | |
| 'category_name' => $term->name | |
| ); | |
| $query = new WP_Query( $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
| <script id="webfont-localstorage-js">!function(){function e(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}function t(e){return window.localStorage&&localStorage.font_css_cache&&localStorage.font_css_cache_file===e}function n(){if(window.localStorage&&window.XMLHttpRequest)if(t(o))a(localStorage.font_css_cache);else{var n=new XMLHttpRequest;n.open("GET",o,!0),e(n,"load",function(){4===n.readyState&&(a(n.responseText),localStorage.font_css_cache=n.responseText,localStorage.font_css_cache_file=o)}),n.send()}else{var c=document.createElement("link");c.href=o,c.rel="stylesheet",c.type="text/css",document.getElementsByTagName("head")[0].appendChild(c),document.cookie="font_css_cache"}}function a(e){var t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}var o="css/fonts.css";window.localStorage&&localStorage.font_css_cache||document.cookie.indexOf("font_css_cache")>-1?n():e(window,"load",n)}();</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
| window.open("http://", "_blank"); |
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
| <style> | |
| /* ---------------------------------------------- /* | |
| * Mouse animate icon | |
| /* ---------------------------------------------- */ | |
| .mouse-icon { | |
| border: 2px solid #000; | |
| border-radius: 16px; | |
| height: 40px; | |
| width: 24px; | |
| display: block; |
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
| //Chrome Smooth Scroll | |
| try { | |
| $.browserSelector(); | |
| if($("html").hasClass("chrome")) { | |
| $.smoothScroll(); | |
| } | |
| } catch(err) { | |
| }; |
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
| //Active menu | |
| $("li a").each(function() { | |
| if (this.href == window.location.href) { | |
| $(this).addClass("active"); | |
| } | |
| }); |
NewerOlder