Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

kash1990 on "how to fetch latest post from a specific category"

$
0
0

I have this code:

<a href="<?php echo get_home_url()?>?cat=15">

								<?php
									$post = get_post(214, ARRAY_A);
								?>
									<?php echo get_the_post_thumbnail($post['ID'], 'full', array('class' => 'img-responsive green')); ?>
									<p class="tag-text">
										<small><?php echo $post["post_content"]?>

										</small>

									</p>
								</a>

How can I replace this code to display latest post content from a specific category, not from the category which is provided in the code. It is working as a static content now. Want to make it dynamic


Viewing all articles
Browse latest Browse all 8245

Trending Articles