Get post title over featured image – customized theme
-
Hi everyone.
I’m having some issues moving the post title above the post thumbnails on my site. This just a dummy site right now, so ignore the place holder text and images.
Here is the site, and here is the original theme, unaltered.
I know this can’t all be done in CSS, so I’m including the PHP I think is responsible for this. This theme has several extra php pages, for some reason.
loop-portfolio.php
<?php if ( have_posts() ) : ?> <?php $i = 0; ?> <?php while ( have_posts() ) : the_post(); $i++; ?> <div class="post_home"> <a href="<?php the_permalink() ?>" class="thumb" title="<?php the_title(); ?>"> <?php if (has_post_thumbnail()) : ?> <?php the_post_thumbnail(array(305,175)); ?> <?php else : ?> <img src="<?php bloginfo('template_url'); ?>/i/noimage.jpg" width="305" height="175" alt=""/> <?php endif; ?> </a> <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> </div> <?php if ($i % 6 == 0) echo '<div style="clear: both;"></div>'?> <?php endwhile; ?> <?php endif; ?>
And the CSS involved:
.post_home {width: 305px; float: left; margin: 0 0 30px 15px;} .thumb {display: block; width: 305px; height: 175px; margin-bottom: 5px; position: relative; color: #333;} .thumb img {display: block; width: 305px; height: 175px;} .thumb span {display: block; width: 305px; height: 175px; position: absolute; top: 0; left: 0; background: #CCFFFF;} .post_home h2 {font-size: 12px; font-weight: normal; text-transform: uppercase;} .post_home h2 a {color: #000; text-decoration: none;} .post_home h2 a:hover {color: #CCC;}
I’m pretty familiar with CSS but am a little skittish with PHP, hence why I turn to you guys haha I just want it above so I can screw around with the look in CSS until I get it right, but I really hate the text being below.
Any help at all is greatly appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get post title over featured image – customized theme’ is closed to new replies.