• Some styles are not being applied. Maybe there is a better method to doing this. Any help is appreciated.

    <?php
     $recent_posts = wp_get_recent_posts(5);
     foreach($recent_posts as $post){
      echo '<div class="left-article">';
      echo '<a href="#"><img class="blog-img" src="images/aaalogo-min.png" alt="blogimg1" /></a>';
      echo '<div class="title"><a href="'.get_permalink($post['ID']).'">'.$post['post_title'].'</a></div>';
      echo '<div class="infobubble">Posted on '.$post['post_date'].'</div>'; // this class is not being applied
      echo '<div class="commentbubble"><a href="'.get_permalink($post['ID']).'#comments">'.$post['comment_count'].'</a></div>'; // this class is not being applied
      echo '</div>';
      echo '<div class ="content">';
      echo '<p class="blogarticle">'.$post['post_content'].'</p>';
      echo '<a href="'.get_permalink($post['ID']).'">Continue reading</a>';
      echo '</div>';
     }
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Would you mind pointing out which style isn’t applying?

    Thread Starter jas-

    (@jas-)

    Sure if you look at the code I posted there are comments following each echo statement in which the class attribute is not being applied.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme help?’ is closed to new replies.