PHP code in template tag
-
<?php $postslist = get_posts('numberposts=10&orderby=title'); foreach ($postslist as $post) : setup_postdata($post); ?>
I need the php code beneath”
<?php $category = get_the_category(); echo $category[0]->cat_ID; ?>
To be inserted in the code above.
So i can display:
get_posts('numberposts=10&category=.......&orderby=title');
and replace ….. with the cateogry ID number.Does anyone understand this?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘PHP code in template tag’ is closed to new replies.