Creating Info Boxes Using Posts
-
I’m trying to “embed” specific posts onto my frontpage so that they show up in boxes and look like the image below:
If images doesn’t show up click this link: https://1drv.ms/i/s!ArYmkC4cbVhGpDobeKBCODJT4fKeOn past websites I’ve used the following code to show a list of posts from specific categories but how do I change this show the content of the specific posts?
<ul> <?php $args = array( 'category' => 2, 'numberposts' => '5', 'post_status' => 'publish', 'tax_query' => array( ) ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ echo '<li><h5><a href="'.get_permalink($recent["ID"]) . '">'.( __($recent["post_title"])).'</a></h5> <p>'.( __($recent["post_excerpt"])).'</p></li> '; } wp_reset_query(); ?> </ul>
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Creating Info Boxes Using Posts’ is closed to new replies.