Created
September 17, 2017 10:35
-
-
Save pagemashine/e06bd905a42deb301890cf2faa3e6ea6 to your computer and use it in GitHub Desktop.
Вывод записей из определенной категории
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
<?php /* template name: аксессуары для мобильных устройств */ ?> | |
<?php get_header(); ?> | |
<div id="container" class="right_container"> | |
<div id="content" class="content" role="main"> | |
<h1 class="page-title">аксессуары для мобильных устройств</h1> | |
<!-- начинается петля --> | |
<?php $acsessuar = new wp_query( array( 'post_type' => 'acsessuar', 'category_name' => 'r_portfolio', 'posts_per_page' => 24 ) ); ?> | |
<?php while ( $acsessuar->have_posts() ) : $acsessuar->the_post(); ?> | |
<div id="post-<?php the_id(); ?>" <?php post_class(); ?>> | |
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : ?> | |
<a class="post_thumbnail" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" alt=""> | |
<?php the_post_thumbnail(array( 234,124)); ?> | |
</a> | |
<?php endif; ?> | |
<a href="<?php the_permalink() ?>"> | |
<?php the_title(); ?> | |
</a> | |
</div> | |
<!-- post --> | |
<?php endwhile; ?> | |
<?php wp_reset_postdata(); ?> | |
<!-- заканчивается петля --> | |
</div> | |
<!-- #content --> | |
</div> | |
<!-- #container --> | |
<?php get_sidebar(); ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment