Синхронизация настроек Sublime Text 3 e02de7830ee606bb0e8fe915387089b2c7d581ec токен
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
-------С www на не-www------- | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www.sdelaysite\.com$ [NC] | |
RewriteRule ^(.*)$ https://sdelaysite.com/$1 [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://sdelaysite.com/$1 [R=301,L] |
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
User-agent: Yandex | |
Disallow: /wp-admin | |
Disallow: /wp-includes | |
Allow: /wp-includes/js/* | |
Disallow: /wp-login.php | |
Disallow: /wp-register.php | |
Disallow: /xmlrpc.php | |
Disallow: *?s* | |
Disallow: *?preview=true* | |
Disallow: */trackback/ |
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
/* ---------------------------------------------------------------------------------------------------- | |
Super Form Reset | |
A couple of things to watch out for: | |
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
- You NEED to set the font-size and family on all form elements | |
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
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
//Аякс отправка форм | |
//Документация: http://api.jquery.com/jquery.ajax/ | |
$("#form, #form2").submit(function(e) { | |
e.preventDefault; | |
$.ajax({ | |
type: "POST", | |
url: "mail.php", | |
data: $(this).serialize() | |
}).done(function() { | |
alert("Спасибо за заявку!"); |
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 | |
$idObj = get_category_by_slug('s_about'); | |
$id = $idObj->term_id; | |
echo get_cat_name($id); | |
?> | |
или | |
<?php | |
$idObj = get_category_by_slug('sto_section'); |
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
//In Template | |
<?php | |
$options = get_option('sample_theme_options'); | |
echo $options['phone1']; | |
?> | |
//in functions.php | |
require_once ( get_stylesheet_directory() . '/theme-options.php' ); |
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 | |
$post = $wp_query->post; | |
if (in_category('cat_label_1')) { | |
include(TEMPLATEPATH.'/single-cat_label_1.php'); | |
} elseif (in_category('cat_label_2')) { | |
include(TEMPLATEPATH.'/single-cat_label_2.php'); | |
} | |
?> |
NewerOlder