<div class="container">
<div class="well well-sm">
<strong>Display</strong>
<div class="btn-group">
<a href="#" id="list" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-th-list">
</span>List</a> <a href="#" id="grid" class="btn btn-default btn-sm"><span
class="glyphicon glyphicon-th"></span>Grid</a>
</div>
</div>
<div id="products" class="row list-group">
<div class="item col-xs-6 col-sm-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400x250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
$21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="http://www.jquery2dotnet.com">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-6 col-sm-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400x250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
$21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="http://www.jquery2dotnet.com">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-6 col-sm-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400x250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
$21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="http://www.jquery2dotnet.com">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-6 col-sm-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400x250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
$21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="http://www.jquery2dotnet.com">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-6 col-sm-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400x250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
$21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="http://www.jquery2dotnet.com">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-6 col-sm-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400x250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
$21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="http://www.jquery2dotnet.com">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
<?php
if (@$_COOKIE['cookie_list'] == 'list' ) {
echo "$('#products .item').addClass('list-group-item');";
}
elseif (@$_COOKIE['cookie_list'] == 'grid') {
echo "$('#products .item').addClass('grid-group-item');
$('#products .item .thumbnail .caption').addClass('caption_none');";
}
else {
echo "$('#products .item .thumbnail .caption').addClass('caption_none');";
}
?>
$('#list').click(function(event){event.preventDefault();$('#products .item').addClass('list-group-item');
$('#products .item .thumbnail .caption').removeClass('caption_none');
$.cookie('cookie_list', 'list', {
expires: 5,
path: '/',
});
});
$('#grid').click(function(event){
event.preventDefault();
$('#products .item').removeClass('list-group-item');
$('#products .item').addClass('grid-group-item');
$('#products .item .thumbnail .caption').addClass('caption_none');
$.cookie('cookie_list', 'grid', {
expires: 5,
path: '/',
});
});
});
</script>
<section>
<div>
<p>текст из поля "текст"</p>
<div><p>текст из поля "цена"</p></div>
</div>
</section>
<?php echo types_render_field( "ЗДЕСЬ_ИМЯ_ПОЛЯ") ?>
<?php echo types_render_field( "price") ?>
<section>
<div>
<p><?php echo types_render_field( "text") ?></p>
<div><p><?php echo types_render_field( "price") ?></p></div>
</div>
</section>
<section>
<div>
<p>то, что написано в поле текст</p>
<div><p>то, что написано в поле цена</p></div>
</div>
</section>
<body <?php if (is_page(здесь впишите id главной страницы)
{echo "style='background-color: green); '";}
else {echo "style='background-color: none;'";}
?> >
<body style='background-color: <?php echo types_render_field( "имя_поля") ?>;'>
<body style='background-color: #ffff;'>
<?php
$page_id = 7;
$page_data = get_page( $page_id );
print apply_filters('the_content', $page_data->post_content);
?>
<?php
/**
* Template Name: contacts
*
*/
get_header(); ?>
/**
* Template Name: имя шаблона
*
*/
<?php if ( have_posts() ) :
query_posts('cat=4');
while ( have_posts() ) : the_post();
if ($post->post_content == ""){
?>
<?php the_title() ?>
<?php the_content() ?>
<?php }
endwhile;
endif;
?>
<div class="container cat_container">
<?php if ( have_posts() ) : ?>
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink(); ?>" style="color:#000; text-decoration:none;" >
<div class="col-sm-4 col-md-3 col-xs-6 for_cat_thumb_info">
<div class="row for_thumb_cat">
<?php if ( has_post_thumbnail()) {the_post_thumbnail('full',array("class"=>"thumb_cat"));} ?>
</div>
<div class="line_cat">
</div>
</div>
</a>
<?php endwhile; ?>
<?php endif; ?>
</div>