• Hey Everyone,

    I’m creating a WordPress theme for a client’s website as a CMS and have run into a bit of a problem.

    Every time I test the <!--nextpage--> function in either a Page or a Post, it messes up the alignment of the footer. Rather than going across the bottom of the page horizontally, it now goes vertically underneath the page/post contents. If I’m on page 2/the last page of the Post/Page, the footer goes horizontal, but is now pushed over to the side of the page instead of the center.

    This happens even if the post is not at the bottom of the page, too.

    Any idea what’s going on?

    Here is the code for the Page (It’s shorter, so I’ll post it instead of the Post code):

    <?php get_header() ?>
    
    	<div id="photos">
    
    		<img src="<?php bloginfo('template_directory'); ?>/images/topphotos.png" alt="" width="960px" height="200px" />
    
    	</div>
    
    <?php get_sidebar() ?>
    
    	<div id="main">
    	<div id="page">
    
    		<?php while ( have_posts() ) : the_post() ?>
    
    			<div id="post-<?php the_ID() ?>" class="post">
    				<h1><?php the_title(); ?></h1>
    
    				<div class="entry-content">
    				<?php the_content('Read more...'); ?>
    				<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:' ) . '&after=</div>') ?>
    				</div>
    
    			</div>
    
    		<?php endwhile; ?>
    
    		</div>
    
    	</div>
    
    	<div class="clearfix"></div>
    
    <?php get_footer() ?>

    Here’s the footer code:

    <div id="footer">
    
    		<div id="foot1">
    			<?php if ( !function_exists('dynamic_sidebar')
    			|| !dynamic_sidebar('footer1') ) : ?>
    			<?php endif; ?>
    		</div>
    
    		<div id="foot2">
    			<?php if ( !function_exists('dynamic_sidebar')
    			|| !dynamic_sidebar('footer2') ) : ?>
    			<?php endif; ?>
    		</div>
    
    		<div id="foot3">
    			<?php if ( !function_exists('dynamic_sidebar')
    			|| !dynamic_sidebar('footer3') ) : ?>
    			<?php endif; ?>
    		</div>
    
        <div class="clearfix"></div>
    
    	</div>
    
    </div>
    
    </body>

    I can’t show you a working version because currently it’s hosted locally on my computer, but here are some screen captures of the issue:

    This is how the footer should look, when next page is NOT used:
    Click Here

    This is how the footer looks on the first page when next page is used:
    Click Here

    This is how the footer looks on the second/last page when next page is used:
    Click Here

    Hope this is easy to fix. It’s got my stumped.

Viewing 1 replies (of 1 total)
  • Thread Starter sarah-kettell

    (@sarah-kettell)

    After several hours of trying, I finally got this fixed.

    The problem wasn’t in the php code, like I kept trying to figure out. The posts were, for some odd reason, adding div tags into themselves. Probably due to the fact that I was copy/pasting the text into it and it brought with it formatting.

    At least it was an easy fix, even if it was frustrating. ??

Viewing 1 replies (of 1 total)
  • The topic ‘wp_link_pages is Changing my Div Alignments’ is closed to new replies.