• Resolved ElSebas

    (@elsebas)


    Well i got a problem with my blog, this is my index html:

    <div id="container">
    <div id="header">
    </div><!--header-->
    <div id="main">
    </div><!--main-->
    <div id="aside">
    </div><!--aside-->
    </div><!--container>

    But when I try to see older posts my markup change to :

    <div id="container">
    <div id="header">
    </div><!--header-->
    <div id="main">
    </div><!--main-->
    </div><!--container>
    <div id="aside">
    </div><!--aside-->

    The aside div gets out of the container. I dont know what could be the problem because everything else is fine, is only when I try to see older posts so Any ideas??

Viewing 3 replies - 1 through 3 (of 3 total)
  • care to link me to the site in question ??

    Make sure your html is validated and that the html format is the same on index.php and page.php if you are using the pages template.

    Aside from viewing the site and mark up myself all I can do is take stabs in the semi-dark.

    Thread Starter ElSebas

    (@elsebas)

    I dont upload the site yet, but here is the full code:
    Index:

    <?php get_header(); ?>
    	<?php if(is_home() && !is_paged()): ?>
    		<?php include (TEMPLATEPATH .'/featured.php'); ?>
    	<?php endif; ?>
    		<div id="wrap_minipost">
    			<?php
    				$limit = get_option('post_per_page');
    				query_posts('showposts='.$limit.'&paged='.$paged.'&cat=-7'); ?>
    				<?php if(have_posts()) :?>
    					<?php while(have_posts()) : the_post(); ?>
    					<!--haz lo que tengas q hacer aqui-->
    					<div id="pst">
    						<div class="img_minipost">
    							<img src="<?php echo get_post_meta($post->ID, 'thumbnail', true)  ?>" alt="Post Image" class="postimg" />
    							<section class="border"></section>
    							<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    							<div class="fecha">
    								<span class="dia"><?php the_time('j') ?></span>
    								<span class="mes"><?php the_time('M') ?></span>
    							</div><!--Termina fecha-->
    						</div><!--Termina img_minipost-->
    						<?php the_content(''); ?><!--El Contenido-->
    						<p><a href="<?php the_permalink(); ?>" rel="leer">Leer mas</a></p>
    					</div><!--Se cierra pst-->
    					<!--haz lo que tengas q hacer aqui-->
    					<?php endwhile; ?>
    				<?php else: ?>
    						<h2>No hay nada</h2>
    						<p>Lo siento, pero lo que buscas no esta aqui</p>
    						<p><a href="<?php echo get_option('home'); ?>">Regresar al inicio</a></p>
    				<?php endif; ?>
    			<div id="pagination">
    				<ul>
    					<li class="anteriores"><?php next_posts_link('Articulos anteriores') ?></li>
    					<li class="nuevos"><?php previous_posts_link('Articulos nuevos') ?></li>
    				</ul>
    			</div><!--Termina pagination-->
    		</div><!--Termina wrap_minipost-->
    	</div><!--Termina main-->
    	<?php get_sidebar(); ?>
    	<div id="footer">
    	</div><!--Termina footer-->
    
    <?php get_footer(); ?>

    Featured:

    <div id="main">
    		<div id="wrap_featured">
    			<?php $my_query = new WP_Query('category_name=Featured&showposts=2');
    			while ($my_query->have_posts()) : $my_query->the_post();
    			$do_not_duplicate = $post->ID; ?>
    				<div id="featured_post">
    					<img src="<?php echo get_post_meta($post->ID, 'imagen_principal', true)  ?>" alt="Post Image" class="postimg" />
    					<div id="info_post">
    						<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    						<?php the_content(''); ?>
    					</div><!--Termina info_post-->
    				</div><!--Termina featured_post-->
    				<?php endwhile; ?>
    		</div><!--Termina wrap_featured-->

    Page:

    <?php get_header(); ?>
    	<?php if(is_home() && !is_paged()): ?>
    		<?php include (TEMPLATEPATH .'/featured.php'); ?>
    	<?php endif; ?>
    	<div id="main">
    		<div id="wrap_minipost">
    			<?php
    				$limit = get_option('post_per_page');
    				query_posts('showposts='.$limit.'&paged='.$paged.'&cat=-7'); ?>
    				<?php if(have_posts()) :?>
    					<?php while(have_posts()) : the_post(); ?>
    					<!--haz lo que tengas q hacer aqui-->
    					<div id="pst">
    						<div class="img_minipost">
    							<img src="<?php echo get_post_meta($post->ID, 'thumbnail', true)  ?>" alt="Post Image" class="postimg" />
    							<section class="border"></section>
    							<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    							<div class="fecha">
    								<span class="dia"><?php the_time('j') ?></span>
    								<span class="mes"><?php the_time('M') ?></span>
    							</div><!--Termina fecha-->
    						</div><!--Termina img_minipost-->
    						<?php the_content(''); ?><!--El Contenido-->
    						<p><a href="<?php the_permalink(); ?>" rel="leer">Leer mas</a></p>
    					</div><!--Se cierra pst-->
    					<!--haz lo que tengas q hacer aqui-->
    					<?php endwhile; ?>
    				<?php else: ?>
    						<h2>No hay nada</h2>
    						<p>Lo siento, pero lo que buscas no esta aqui</p>
    						<p><a href="<?php echo get_option('home'); ?>">Regresar al inicio</a></p>
    				<?php endif; ?>
    			<div id="pagination">
    				<ul>
    					<li class="anteriores"><?php next_posts_link('Articulos anteriores') ?></li>
    					<li class="nuevos"><?php previous_posts_link('Articulos nuevos') ?></li>
    				</ul>
    			</div><!--Termina pagination-->
    		</div><!--Termina wrap_minipost-->
    	</div><!--Termina main-->
    	<?php get_sidebar(); ?>
    	<div id="footer">
    	</div><!--Termina footer-->
    
    <?php get_footer(); ?>

    Thread Starter ElSebas

    (@elsebas)

    Ok problem solved, just need it to change the div main outside the featured haha I can’t believe that I missed that. Anyways thank you randinicole 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with html markup!!’ is closed to new replies.