• whatisstephenharperreading

    (@whatisstephenharperreading)


    Hi everyone,

    I’m new to WordPress and also to PHP coding. With the generous help from users in these forums, I’ve managed to display recent posts with images in the sidebar. Here’s the website:

    https://www.whatisstephenharperreading.ca/wordpress/

    What I’ve been trying to do is to get the entries in the sidebar to display side by side in two columns to limit the amount of vertical scrolling (there are over 30 entries at present). Unfortunately, I lack the coding skills to be able to pull this off. Any help would be greatly appreciated.

    Many thanks!

    Here’s the sidebar code that describes the previously sent books section:

    • <h2>Previously sent books</h2>

      <?php $myposts = get_posts(‘numberposts=5&offset=1’);
      foreach($myposts as $post) :?>
      <?php $thumbnail = get_post_meta($post->ID, ‘post_thumb’, true); ?>

  • The topic ‘PHP code to place recent posts in sidebar side by side’ is closed to new replies.