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
<input class="hide" id="hd-1" type="checkbox" > | |
<label for="hd-1">Нажмите здесь, чтобы открыть!</label> | |
<div>Скрытое содержание......</div> | |
<input class="hide" id="hd-2" type="checkbox" > | |
<label for="hd-2">Нажмите здесь, чтобы прочитать больше!</label> | |
<div>Скрытое содержание...</div> | |
CSS | |
/* |
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
<span class="hider social-icon social-icon-default fa fa-arrow-circle-down"></span> | |
<div id="hidden" style="display:none"> | |
<ul> | |
<li><a href="">Home</a></li> | |
<li><a href="">News</a></li> | |
<li><a href="">Post</a></li> | |
<li><a href="">Exit</a></li> | |
</ul> |
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
html// | |
<div class="pricing-grid"> | |
<div class="plan plan1"> | |
<h2>Title</h2> | |
<p>Some short description</p> | |
<ul class="features"> | |
<li>Feature 1</li> | |
<li>Feature 2</li> |
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="grid"> | |
<div class="grid__row"> | |
<div class="grid__item"> | |
<div class="item"> | |
<p>Hello</p> | |
<a href="#">Click</a> | |
</div> | |
</div> | |
<div class="grid__item"> | |
<div class="item"> |
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="slider-wrapper"> | |
<!-- Выводим посты из категории Technology в слайдер --> | |
<?php | |
$slide = array('category_name'=>'Business', 'posts_per_page'=>-1); | |
query_posts($slide); | |
while ( have_posts() ) : the_post(); | |
?> | |
<div class="slide"> | |
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a> |
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
//1 Method - DONT WORK | |
<?php | |
$query = new WP_Query(array('category_name' => 'Technology', 'posts_per_page' => 1) ); //указываем имя категории рубрики, которые нужно вывести | |
if ( have_posts() ) : // если имеются записи в блогею | |
while ( $query -> have_posts() ) : $query->the_post(); // запускаем цикл перебора материала блога. | |
?> | |
<section class="technology-post"> | |
<h5 class="category-name"><?php the_category(); ?></a></h5> |
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
//----- Popular post-2 | |
// DIY Popular Posts @ https://digwp.com/2016/03/diy-popular-posts/ | |
function shapeSpace_popular_posts($post_id) { | |
$count_key = 'popular_posts'; | |
$count = get_post_meta($post_id, $count_key, true); | |
if ($count == '') { | |
$count = 0; | |
delete_post_meta($post_id, $count_key); | |
add_post_meta($post_id, $count_key, '0'); | |
} else { |
OlderNewer