cdeuro
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Developing with WordPress
In reply to: Creating Info Boxes Using PostsGot it to work!! ^_^
<?php while ( have_posts() ) : the_post(); ?> <ul> <?php $posts = get_posts( array( 'posts_per_page' => 5 ) ); foreach ( $posts as $_post ) { if ( has_post_thumbnail( $_post->ID ) ) { echo '<li><h5><a href="'.get_permalink($_post->ID) . '">'.( __($_post->post_title)).'</a></h5>'.get_the_post_thumbnail( $_post->ID, 'thumbnail' ).'<p>'.( __($_post->post_content)).'</p></li>'; } } ?> </ul> <?php endwhile; ?>Forum: Developing with WordPress
In reply to: Creating Info Boxes Using PostsThanks @sterndata, I was able to get the posts to show I wanted them. The only issue I’m having now is that the featured images won’t show up. I’ve looked through the documentations, through people’s examples, but I can’t figure out the correct combination. Here’s my website: http://medicalinheritance.com/testing/
I’m using i-Craft as my base theme. I’ve gone through the settings and the code, I can’t find anything that might be preventing them from showing up.
<ul> <?php $args = array( 'category' => 20, 'numberposts' => '3', 'post_status' => 'publish', 'tax_query' => array( ) ); $recent_posts = wp_get_recent_posts( $args ); if ( has_post_thumbnail()) { $recent_thumb = get_post_thumbnail_id($recent_posts); } foreach( $recent_posts as $recent ){ echo '<li>'.the_post_thumbnail( $recent_posts ).' <h2>'.( __($recent["post_title"])).'</h2> <p>'.( __($recent["post_content"])).'</p></li> '; } wp_reset_query(); ?> </ul>- This reply was modified 8 years, 3 months ago by cdeuro.
Forum: Fixing WordPress
In reply to: Domain Name IssuesThe image is HERE
Viewing 3 replies - 1 through 3 (of 3 total)