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 ( have_posts() ) : query_posts('p=1'); | |
| while (have_posts()) : the_post(); ?> | |
| <?php the_title(); ?> | |
| <?php the_content(); ?> | |
| <?php the_post_thumbnail(array(100, 100)); ?> | |
| <? endwhile; endif; wp_reset_query(); ?> |
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_resume'); | |
| $id = $idObj->term_id; | |
| echo get_cat_name($id); | |
| ?> |
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 $args = array( | |
| 'post_type' => 'schools', | |
| 'publish' => true, | |
| 'author' => $author -> post_author, | |
| ); | |
| $schools = new WP_Query( $args ); | |
| if( $schools->have_posts() ) : | |
| while( $schools->have_posts() ) : | |
| $schools->the_post(); ?> |
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
| <table> | |
| <tr> | |
| <th></th> - делает текст в ячейки жирным | |
| ........ | |
| <td></td> | |
| </tr> | |
| ....... | |
| <tr> | |
| <td></td> | |
| ........ |
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
| <form action="order.php" method="post"> | |
| <label for="login-field">Ваш пароль</label> | |
| <input type="text" name="login" id="login-field" value="5"> //value - задает знаяение поля по умолчанию, id- идентификатор, используется для JavaScript | |
| <label for="password-field">Ваш пароль</label> | |
| <input type="password" name="password" id="password-field"> // type для пароля ="password" - в поле будет отображатся звездочками. | |
| " <input type="submit" value="Войти"> //кнопка Войти | |
| </form> | |
| <textarea name="comment" id="comment-field" rows="10">Текст комментария</textarea> // добавит многострочный ввод даных, rows="10" - высота |
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 вставить в структуру HTML-документа узлы, которых нет в HTML коде. Т. е. можно вставить в код | |
| элемент и не писать его в HTML. Благодаря псевдоэлементам появилось решение проблемы флоатов без использования дополнительного элемента.*/ | |
| /* Класс псевдораспорки */ | |
| .clearfix::after { | |
| content: ""; | |
| display: table; | |
| clear: both; | |
| } | |
| ------------------------------------------------------------------------------------------------------------------------ | |
| /*«хедер - две колонки - футер»*/ |
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://meyerweb.com/eric/tools/css/reset/ | |
| v2.0 | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
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
| <form method="post" action="mailto:owen@aliensabductedme.com"> | |
| <label for="firstname">First name:</label> | |
| <input type="text" id="firstname" name="firstname" /><br /> | |
| <label for="lastname">Last name:</label> | |
| <input type="text" id="lastname" name="lastname" /><br /> | |
| <label for="email">What is your email address?</label> | |
| <input type="text" id="email" name="email" /><br /> | |
| <label for="whenithappened">When did it happen?</label> | |
| <input type="text" id="whenithappened" name="whenithappened" /><br /> | |
| <label for="howlong">How long were you gone?</label> |
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
| //DOM | |
| // Поиск элемента по тегу | |
| var list = document.querySelector('ul'); | |
| // Поиск последнего элемента из списка | |
| var lastProduct = document.querySelector('li:last-child'); | |
| // Поиск элемента по классу | |
| var price = document.querySelector('.price'); |
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
| wp_enqueue_style(); - Правильно добавляет файл CSS стилей | |
| wp_enqueue_script(); - Правильно подключает скрипт (JavaScript файл) на страницу. | |
| get_template_directory_uri() - Получает URL родительской темы (вернет URL родительской темы, даже если используется дочерняя). Не содержит закрывающий слэш. | |
| get_stylesheet_uri() - Получает ссылку (URL) на файл стилей style.css текущей темы. | |
| <?php the_content() ?>; | |
| <?php the_title() ?> -Выводит на экран заголовок записи. Принято использовать внутри цикла. | |
| <?php the_excerpt() ?> - Выводит отрывок (цитату) поста, со вставкой в конец [...] (но это не ссылка на прочтение полного материала). | |
| <?php the_permalink() ?> - Выводит ссылку (УРЛ) на пост, который в текущий момент обрабатывается в Цикле. | |
| <?php add_theme_support() ?> - Регистрирует поддержку новых возможностей темы в WordPress (поддержка миниатюр, форматов записей и т.д.). | |
| <?php the_post-thumbnails() ?> - Выводит html код картинки-миниатюры текущего поста. Принято использовать внутри цикла. |
OlderNewer