Jump to content

PHP div issue


cm123077

Recommended Posts

I am working on this site: http://174.120.16.66/~thomasse/

 

As you may have noticed, there are 3 blurb div areas at the bottom of the page. These are created in the file home.php.  Unfortunately, this is producing an extra div tag, pushing the MiniTweets box to the right, covering the next box.

 

How do I change the formula in the code so it does not produce the first, extra div tag?  Thanks.

 

 

This is the code producing this content...

<div id="blurbs"><div id="twitter"><?php echo do_shortcode('[minitwitter username="Thomas_Services" limit=2]'); ?></div>
	<?php for ($i = 2; $i <= 3; $i++) { ?>
	<?php query_posts('page_id=' . get_pageId(html_entity_decode(get_option('simplepress_service_'.$i)))); while (have_posts()) : the_post(); ?>
        <?php $icon = '';
					$icon = get_post_meta($post->ID, 'Icon', true);
					$tagline = '';
					$tagline = get_post_meta($post->ID, 'Tagline', true); ?>
        <div <?php if ($icon <> '') { ?>style="background-image: url(<?php echo esc_url($icon); ?>);"<?php }; ?>>
            <span class="titles"><?php the_title(); ?></span>
            <?php global $more;   
					$more = 0;
					the_excerpt(); ?>
            <br class="clear" />
            <span class="readmore"><a href="<?php the_permalink(); ?>"><?php esc_html_e('read more','SimplePress'); ?></a></span>
        </div>
        <?php endwhile; wp_reset_query(); ?>
	<?php }; ?>

        <br class="clear" />
    </div>

 

Here is the code for the page in its entirety

<?php get_header(); ?>
<?php if (get_option('simplepress_featured') == 'on') get_template_part('includes/featured'); ?>
<?php if (get_option('simplepress_quote') == 'on' && get_option('simplepress_blog_style') == 'false') { ?>
	<div id="quote">
		<div>
			<?php echo (get_option('simplepress_quote_one')); ?>
			<br class="clear" />
		  <span><?php echo (get_option('simplepress_quote_two')); ?></span>
		</div>
	</div>
    <?php }; ?>
    <?php if (get_option('simplepress_blog_style') == 'on') { ?>
	<div id="content" style="margin-top: 40px;">
		<div class="content_wrap">
			<div class="content_wrap">
				<div id="posts">			
					<?php get_template_part('includes/entry'); ?>
				</div><!-- #posts -->  
				<?php $gallery_cat = get_option('simplepress_gallery');
				if(is_category($gallery_cat)) { } else { get_sidebar(); }; ?>
			</div><!-- .content_wrap --> 
		</div><!-- .content_wrap --> 
	</div><!-- #content --> 
<?php }; ?>
</div><!-- .wrapper --> 
<?php if (get_option('simplepress_blog_style') == 'false') { ?>
<div id="strip-top"></div>
<div id="strip">
  <div> <?php echo (get_option('simplepress_strip')); ?>
      <img class="arrow" src="<?php bloginfo('template_directory'); ?>/images/strip-arrow.png" alt="" />
  </div>
</div>
<div class="wrapper">
    <div id="blurbs"><div id="twitter"><?php echo do_shortcode('[minitwitter username="Thomas_Services" limit=2]'); ?></div>
	<?php for ($i = 2; $i <= 3; $i++) { ?>
	<?php query_posts('page_id=' . get_pageId(html_entity_decode(get_option('simplepress_service_'.$i)))); while (have_posts()) : the_post(); ?>
        <?php $icon = '';
					$icon = get_post_meta($post->ID, 'Icon', true);
					$tagline = '';
					$tagline = get_post_meta($post->ID, 'Tagline', true); ?>
        <div <?php if ($icon <> '') { ?>style="background-image: url(<?php echo esc_url($icon); ?>);"<?php }; ?>>
            <span class="titles"><?php the_title(); ?></span>
            <?php global $more;   
					$more = 0;
					the_excerpt(); ?>
            <br class="clear" />
            <span class="readmore"><a href="<?php the_permalink(); ?>"><?php esc_html_e('read more','SimplePress'); ?></a></span>
        </div>
        <?php endwhile; wp_reset_query(); ?>
	<?php }; ?>

        <br class="clear" />
    </div>
    <span class="blurbs_shadow"></span>
</div>
<?php }; ?>
<?php get_footer(); ?>	

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.