Horizontal Post Display on Static Home Page
-
Hello all, I hope you can help me with this.
I have a network of sites that I finally was able to configure to send any most recent post from any site on to the static home page I have created. The home page will be this:
If you scroll down, the sections called “theWork” is where I want to display the loop of recent posts. I currently have it set for 2 but I will ultimately have 3.
My question is that I would like to display them horizontally as opposed to the generic vertical loop. Can this be done?
My index.php section for this looks like this:
<div id="recentinfo"> <div id="wordpress_loop"> <?php // Include WordPress define('WP_USE_THEMES', false); require('https://themodernmixtape.com/wp-load.php'); query_posts('showposts=2'); ?> <?php while (have_posts()): the_post(); ?> <h2 class="post_title"><?php the_title(); ?></h2> <?php the_excerpt(); ?> <p class="main_text"><a href="<?php the_permalink(); ?>">Read more...</a></p> <?php endwhile; ?> </div> </div>
My CSS for this looks like this:
.post_title { color:#009999; font-size:32px; font-family:Calibri; display: inline-table; text-align:center; } #wordpress_loop p { text-decoration:none; color:#fff; font-family:Georgia, "Times New Roman", Times, serif; font-size:18px; text-align:center; padding-bottom:10px; } #wordpress_loop a { text-decoration:none; color:#009999; padding-bottom:10px; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Horizontal Post Display on Static Home Page’ is closed to new replies.