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
<div class="wrapper"> | |
<div class="tabs"> | |
<span class="tab">Вкладка 1</span> | |
<span class="tab">Вкладка 2</span> | |
<span class="tab">Вкладка 3</span> | |
</div> | |
<div class="tab_content"> | |
<div class="tab_item">Содер. 1</div> | |
<div class="tab_item">Содер. 2</div> | |
<div class="tab_item">Содер. 3</div> |
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserSync = require('browser-sync'), | |
uglify = require('gulp-uglifyjs'), | |
concat = require('gulp-concat'), | |
rename = require('gulp-rename'), | |
cssnano = require('gulp-cssnano'), | |
del = require('del'), | |
imagemin = require('gulp-imagemin'), | |
pngquant = reuqire('imagemin-pngquant'), |
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
.htaccess | |
Options +MultiViews | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^\.]+)$ $1.php [NC,L] |
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
Плагины (Ctrl + Shift + P > Install Package): | |
Emmet - ускоряет написание HTML и CSS кода до скорости света. Урок по Emmet; | |
AutoFileName - дополняет код при написании путей до файлов в вёрстке; | |
Gist - подключает в Sublime Text возможность использовать сервис сниппетов кода GitHub Gist. Урок по Gist; | |
Sass - плагин для подсветки Sass синтаксиса в Sass и Scss файлах. Раскрывает Emmet в Sass файлах | |
One Dark Color Scheme - цветовая схема для подсветки кода; | |
One Dark Material - Theme - тема оформления UI Sublime Text. | |
Preferences > Settings |
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_more_options() { | |
add_settings_field('phone', 'Телефон', 'display_phone', 'general'); | |
register_setting('general', 'company_phone'); | |
} | |
add_action('admin_init', 'my_more_options'); | |
function display_phone() { | |
echo "<input type='text' name='company_phone' autocomplete='off' value='".esc_attr(get_option('company_phone'))."'>"; | |
} |
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
В папке с темой создать: framework-customizations\extensions\media\extensions\slider\extensions\<название кастомного слайдера> | |
Структура: static, views, config.php, manifest.php, options (опции при создании слейдера и опции конкретного слайдА) | |
В папке views должен быть файл с таким же названием слайдера (test-slider.php): | |
<?php if (!defined('FW')) die('Forbidden'); ?> | |
<?php if (isset($data['slides'])): ?> | |
//Дальше творим, что хотим | |
<div class='owl-carousel owl-theme'> |
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
Результат: site.ru/news/42 | |
site.ru/news - страница новостей (category-news.php). Т. е. это категория, а не страница. | |
Но её точно так же можно кастомизировать, как и страницу. | |
site.ru/news/42 - конкретная новость (single.php) | |
Что делать: | |
1. Создать РУБРИКУ "Новости" с ярлыком (слагом) "news". | |
2. В папке с темой создать файл category-news.php и выводить записи (новости) по ID рубрики: | |
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
$query = array( |
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_action( 'wp_head', 'wp_resource_hints', 1); | |
remove_action( 'wp_head', 'feed_links',2); | |
remove_action( 'wp_head', 'feed_links_extra',3); | |
remove_action( 'wp_head', 'rsd_link'); | |
remove_action( 'wp_head', 'wlwmanifest_link'); | |
remove_action( 'wp_head', 'wp_shortlink_wp_head'); | |
remove_action( 'wp_head', 'wp_generator'); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7); | |
remove_action( 'wp_print_styles', 'print_emoji_styles'); | |
remove_action( 'wp_head', 'rest_output_link_wp_head'); |
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
rimraf node_modules/ |
OlderNewer