-
-
Save Scordavis/cccc88afec4143761dca830cf0f82c22 to your computer and use it in GitHub Desktop.
WordPress КОРРЕКТНЫЙ вызов записей из категории
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 | |
$id=4; // ID заданной рубрики | |
$n=5; // количество выводимых записей | |
$recent = new WP_Query("cat=$id&showposts=$n"); | |
while($recent->have_posts()) : $recent->the_post(); | |
?> | |
<div> | |
... | |
</div> | |
<?php endwhile; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment