Avatar of axessJosh
axessJosh
 asked on

homepage footer not 100% like other site pages

I've been troubleshooting for about an hour and cannot figure out why my footer on teh homepage is not extending 100% like it does on other pages.  

www.harvestofhopechurch.org 

would appreciate another set of eyes.  Thanks.
CSS

Avatar of undefined
Last Comment
Kiran Paul VJ

8/22/2022 - Mon
Kiran Paul VJ

Footer div is inside the div #wrapper.

Put footer dive outside  div #wrapper.
axessJosh

ASKER
the footer is an Wordpress include, so it doesn't make sense that it would be different on the homepage than other pages because they are all using the same

<?php get_footer(); ?>

??
Kiran Paul VJ

Can you post the home page code.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
axessJosh

ASKER
here you go.
<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>
		<div id="home-content">
        	<div id="slider">
            <?php if (function_exists('easing_slider')){ easing_slider(); }; ?>
            <div class="content-img"><a href="/new-to-hoh/welcome/"><img src="<?php bloginfo('template_directory'); ?>/images/hoh-welcome-video.png"  /></a></div>
            <div class="content-img"><a href="/calendar"><img src="<?php bloginfo('template_directory'); ?>/images/hoh-view-calendar.png"  /></a></div>
            <div class="content-img"><a href="/about-hoh/"><img src="<?php bloginfo('template_directory'); ?>/images/hoh-about.png"  /></a></div>
            </div><!-- end #slider -->
            <div id="right-info">
				<h2>Harvest of Hope</h2>
            	<p>Welcome to our church.  We're glad you have checked us out and look forward to a chance to meet you.  It is our hope to reach the Platte County area to inspire others in their relationship with Christ.
            <div id="upcoming-events">
            	<h2>News & Events - view all</h2>
                <?php
		// get most recent post information and display in right sidebar on hompepage with title 
			$args = array( 'numberposts' => 3);
			$lastposts = get_posts( $args );
			foreach($lastposts as $post) : setup_postdata($post); ?>
            <div id="home-info">
            <div id="home-thumb">
            	<?php if(has_post_thumbnail()) {
				echo get_the_post_thumbnail($post_id, array(50,50)); 
					} else { ?>

				<img src="<?php bloginfo('template_directory'); ?>/images/hoh-default-thumb.png" alt="<?php the_title(); ?>" width="50px"/>

				<?php } ?>
            
            </div><!-- end #home-thumb -->
            <div id="home-text">
			<p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
			<?php echo substr(get_the_excerpt(), 0,50); ?>
            </div><!-- end #home-text -->
            <hr />
			<?php endforeach; ?>
            </div><!-- end #upcoming-events -->
            </div><!-- end #right-info -->	
        </div><!-- end #home-content -->
		


<?php get_footer(); ?>

Open in new window

Kiran Paul VJ

You have a missing tag.


add closing div tag at line 56.

so it will look like

</div>
<?php get_footer(); ?>

Open in new window

Kiran Paul VJ

The position of the closing div tag may be different. By ONE closing div is missing. That is causing problem in browser rendering.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Kiran Paul VJ

I think

<div id="home-info">

Open in new window


is not closed properly. Check it.
Kiran Paul VJ

The full working code will look something like

<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

<div id="home-content">
  <div id="slider">
    <?php if (function_exists('easing_slider')){ easing_slider(); }; ?>
    <div class="content-img">
      <a href="/new-to-hoh/welcome/"><img src="<?php bloginfo('template_directory'); ?>/images/hoh-welcome-video.png"  /></a>
    </div>
    <div class="content-img">
      <a href="/calendar"><img src="<?php bloginfo('template_directory'); ?>/images/hoh-view-calendar.png"  /></a>
    </div>
    <div class="content-img">
      <a href="/about-hoh/"><img src="<?php bloginfo('template_directory'); ?>/images/hoh-about.png"  /></a>
    </div>
  </div>
  <!-- end #slider -->
  <div id="right-info">
    <h2>Harvest of Hope</h2>
    <p>Welcome to our church.  We're glad you have checked us out and look forward to a chance to meet you.  It is our hope to reach the Platte County area to inspire others in their relationship with Christ.
    <div id="upcoming-events">
      <h2>News & Events - view all</h2>
      <?php
		// get most recent post information and display in right sidebar on hompepage with title 
			$args = array( 'numberposts' => 3);
			$lastposts = get_posts( $args );
			foreach($lastposts as $post) : setup_postdata($post); ?>
      <div id="home-info">
        <div id="home-thumb">
          <?php if(has_post_thumbnail()) {
				echo get_the_post_thumbnail($post_id, array(50,50)); 
					} else { ?>
          <img src="<?php bloginfo('template_directory'); ?>/images/hoh-default-thumb.png" alt="<?php the_title(); ?>" width="50px"/>
          <?php } ?>
        </div>
        <!-- end #home-thumb -->
        <div id="home-text">
          <p><a href="<?php the_permalink(); ?>">
            <?php the_title(); ?>
            </a>
          </p>
          <?php echo substr(get_the_excerpt(), 0,50); ?>
        </div>
        <!-- end #home-text -->
        <hr />
      </div>
      <?php endforeach; ?>
    </div>
    <!-- end #upcoming-events -->
  </div>
  <!-- end #right-info -->
</div>
<!-- end #home-content -->
<?php get_footer(); ?>

Open in new window

axessJosh

ASKER
that is what I originally thought but hasn't resolved the issue.

i just added the additional closing </div> tag but you can see it still has the same issue.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Kiran Paul VJ

Did you try the full code I posted?
axessJosh

ASKER
Just did,

now the footer dissappeared.

see the link www.harvestofhopechurch.org
Kiran Paul VJ

Now the footer moved to right-info div. See the attached imagecode in Firebug
This is clearly an issue with closing of tags. The p tag at line 34 is also not closed properly.

Can you post the header file also.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Kiran Paul VJ

Also to pinpoint the issue remove everything between

get_header(); and get_footer();  and check.
axessJosh

ASKER
you are correct, the problem is in the code between:

get_header(); and get_footer();

when i removed all the content there, everything displayed correctly.

now to find the incorrectly closed tag...
ASKER CERTIFIED SOLUTION
Kiran Paul VJ

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
axessJosh

ASKER
I cannot find an unclosed <p> tag in live file.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Kiran Paul VJ

Check in the php file, in live you cannot find it. line no 34

<p>Welcome to our church.  We're glad you have checked us out and look forward to a chance to meet you.  It is our hope to reach the Platte County area to inspire others in their relationship with Christ.

Open in new window

axessJosh

ASKER
Found a missing </div> tag before the end of the PHP loop.

thanks for the idea to remove section by section.
Kiran Paul VJ

Glad to know its fixed.

Kiranvj
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.