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 | |
| // в файле wp-config.php добавляем константу | |
| define('MY_THEME', 'http://mysite.loc/your-url-here/') | |
| // а уже в других файлах где нам надо указываем MY_THEME | |
| echo '<img src="'.MY_THEME.'/link-to-0image" />'; | |
| ?> |
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 | |
| // в посте добавить | |
| [shortcodeName] | |
| // в файле functions.php | |
| function fncName() | |
| { | |
| //body | |
| return $output; |
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 | |
| /*in themefile*/ | |
| <?php if (function_exists('wp_corenavi')) wp_corenavi(); ?> | |
| ?> | |
| <?php | |
| /*in funtion.php*/ | |
| function wp_corenavi(){ | |
| global $wp_query, $wp_rewrite; | |
| $pages = ''; |
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
| /*резать картинку это долго и нудно.*/ | |
| в css: | |
| .email-address:before { | |
| content: "[email protected]"; | |
| } | |
| а в html просто добавить класс | |
| email: <span class="email-address"></span> |
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 type="text/javascript"> | |
| emailE = ('info' + '@' + 'site.com') | |
| document.write('<a href="mailto:' + emailE + '" title="Контактный Email">' + emailE + '</a>') | |
| </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
| /*HTML*/ | |
| <div id="loader"><div id="loaderInner"></div></div> | |
| /*CSS*/ | |
| #loader { | |
| background: none repeat scroll 0 0 #ffffff; | |
| bottom: 0; | |
| height: 100%; | |
| left: 0; | |
| position: fixed; |
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 heightDetect() | |
| { | |
| $(".main_head").css("height", $(window).height()); | |
| }; | |
| heightDetect(); | |
| $(window).resize(function() | |
| { | |
| heightDetect(); |
NewerOlder