Problema ao fechar as Div's corretamente

  • Autor Autor shadowhck
  • Data de início Data de início
Tradução em andamento: em alguns minutos este tópico estará em português. Por enquanto, o conteúdo está no original em espanhol. Ver original
shadowhck

shadowhck

Lambda
Programador
hola, necesito ayuda, el siguiente codigo no encaja correctamente ya intente de muchas maneras pero no logro corregirlo, el Notepad ++ no resalta correctamente las entradas y cierres de estos :itsme::

HTML:
        <!-- Content Starts -->
        <div id="content" class="wrap"><!--div content-->
    <!-- estrenos starts -->
    <div class="estrenos">
<div class="tituloslide"><a target="_parent" title="New Movies" href="http://moviestown.org/news/movies"><strong>New Movies</strong></a></div>
<?php $my_query = new WP_Query('showposts=8&cat=1'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post();?>    
    
    <div class="slideshow">
     <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php woo_get_image('image','83','125'); ?></a>   
    </div>
    <?php endwhile; wp_reset_query(); ?>
    </div>
<!-- estrenos ends -->
<div class="ads-top"><!-- codigo de publicidad--></div>
<div class="ads-top"><!-- codigo de publicidad --></div>
<div class="ads-top"><!-- codigo de publicidad --></div>

        <div class="col-left home"><!--div col-left home-->
        
        <?php if (is_paged()) $is_paged = true; ?>
        <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("paged=$paged"); ?>
        <?php if (have_posts()) : $count = 0; $boxcount = 0;?>
        <?php while (have_posts()) : the_post(); $count++; ?>
            <?php if ($count == 1 && get_option('woo_home_featured') == "true" && !$is_paged) : ?>
            <div id="main"><!--div main-->
                <div id="main-content"><!--div main-content-->
                                                                            
                    <?php echo woo_get_embed('embed','640','360'); ?>
                    <!-- Post Starts -->
                    <div class="post wrap"><!--div post wrap-->

                        <?php echo get_avatar( get_the_author_id(), '37' ); ?>

                        <div class="fl">
                            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                            <p class="post-details">Posted on <?php the_time('d. M, Y'); ?> by  <?php the_author_posts_link(); ?> in <?php the_category(', ') ?></p>
                        </div>
                        
                        <div class="comment-cloud fr">
                            <a href="<?php comments_link(); ?>"><?php comments_number('0','1','%'); ?></a>
                        </div>                   
                        <?php if(function_exists('the_ratings')) { echo '<div class="fr ratings">'; the_ratings(); echo '</div>'; } ?>
                        
                        <div class="fix"></div>
                        
                        <?php if (get_option('woo_home_content') == "true") the_content(); ?>
 
                    </div><!--div post wrap-->
                    <!-- Post Ends -->
                                                        
                    <?php if (get_option('woo_ad_content_disable') == "false") { ?>            
                        <?php include (TEMPLATEPATH . "/ads/content_ad.php"); $ad_shown = true; ?>
                    <?php }    ?>

                </div><!--div main-content-->
                <!-- main-content ends -->

            </div><!--div main-->
            <!-- main ends -->
            
            <?php continue; endif; ?>

            <div class="video-box <?php $boxcount++; if ($boxcount == 0) { echo 'last'; } ?> ">
            
                <div class="inside">
                   <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php woo_get_image('image','166','250'); ?> </a>  
                   
                    <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
                </div>              
                
                                                
            </div>
            
           <?php if ($boxcount == 8) { $boxcount = 0; echo '<div class="fix"></div>
            <div class="ads-left"></div>
            <div class="ads-right"></div>'; } ?>

        <?php endwhile; else: ?>
            <p>Sorry, no posts matched your criteria.</p>
        <?php endif; ?>  
        
        <div class="fix"></div>

        
        <div class="more_entries">
            <?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
            <div class="alignleft"><?php previous_posts_link('&laquo; Newer Entries ') ?></div>
            <div class="alignright"><?php next_posts_link(' Older Entries &raquo;') ?></div>
            <br class="fix" />
            <?php } ?> 
        </div>        
              
        </div>
        <!-- .col-left ends -->

        <div class="col-right">
            <?php get_sidebar(); ?>
        </div>
        <!--/div--><!--div col-left home-->
    </div><!--div content-->
    <!-- Content Ends -->
 
Foi útil? Participe da conversa

Com sua conta grátis você pode responder, mandar mensagem privada ao autor e comprar com Saldo retido: o pagamento é liberado quando você recebe o combinado.

Leva 30 segundos · você volta a este tópico ao terminar
revise los divs y estan cerrados correctamente, mas bien debe ser las propiedades styles

aqui te pongo el code un poco mas ordenado...

Inserir CODE, HTML ou PHP:
<!-- Content Starts -->
<div id="content" class="wrap"><!--div content-->

    <!-- estrenos starts -->
    <div class="estrenos">
		<div class="tituloslide"><a target="_parent" title="New Movies" href="http://moviestown.org/news/movies"><strong>New Movies</strong></a></div>
		<?php $my_query = new WP_Query('showposts=8&cat=1'); ?>
		<?php while ($my_query->have_posts()) : $my_query->the_post();?>    
    
		<div class="slideshow">
			<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php woo_get_image('image','83','125'); ?></a>   
		</div>
		<?php endwhile; wp_reset_query(); ?>
    </div>
	<!-- estrenos ends -->
	
	<div class="ads-top"><!-- codigo de publicidad--></div>
	<div class="ads-top"><!-- codigo de publicidad --></div>
	<div class="ads-top"><!-- codigo de publicidad --></div>

    <div class="col-left home"><!--div col-left home-->
        
        <?php if (is_paged()) $is_paged = true; ?>
        <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("paged=$paged"); ?>
        <?php if (have_posts()) : $count = 0; $boxcount = 0;?>
        <?php while (have_posts()) : the_post(); $count++; ?>
            <?php if ($count == 1 && get_option('woo_home_featured') == "true" && !$is_paged) : ?>
            <div id="main"><!--div main-->
                <div id="main-content"><!--div main-content-->                                                                           
                    <?php echo woo_get_embed('embed','640','360'); ?>
                    <!-- Post Starts -->
                    <div class="post wrap"><!--div post wrap-->
                        <?php echo get_avatar( get_the_author_id(), '37' ); ?>

                        <div class="fl">
                            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                            <p class="post-details">Posted on <?php the_time('d. M, Y'); ?> by  <?php the_author_posts_link(); ?> in <?php the_category(', ') ?></p>
                        </div>
                        
                        <div class="comment-cloud fr">
                            <a href="<?php comments_link(); ?>"><?php comments_number('0','1','%'); ?></a>
                        </div>                   
                        <?php if(function_exists('the_ratings')) { echo '<div class="fr ratings">'; the_ratings(); echo '</div>'; } ?>
                        
                        <div class="fix"></div>
                        
                        <?php if (get_option('woo_home_content') == "true") the_content(); ?>
                    </div><!--div post wrap-->
					
                    <!-- Post Ends -->
                                                        
                    <?php if (get_option('woo_ad_content_disable') == "false") { ?>            
                        <?php include (TEMPLATEPATH . "/ads/content_ad.php"); $ad_shown = true; ?>
                    <?php }    ?>

                </div><!--div main-content-->
            </div><!--div main-->
            <!-- main ends -->
            
            <?php continue; endif; ?>

            <div class="video-box <?php $boxcount++; if ($boxcount == 0) { echo 'last'; } ?> ">
            
                <div class="inside">
                   <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php woo_get_image('image','166','250'); ?> </a>  
                   
                    <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
                </div>                                              
            </div>
            
           <?php if ($boxcount == 8) { $boxcount = 0; echo '<div class="fix"></div>
            <div class="ads-left"></div>
            <div class="ads-right"></div>'; } ?>

        <?php endwhile; else: ?>
            <p>Sorry, no posts matched your criteria.</p>
        <?php endif; ?>  
        
        <div class="fix"></div>

        
        <div class="more_entries">
            <?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
            <div class="alignleft"><?php previous_posts_link('&laquo; Newer Entries ') ?></div>
            <div class="alignright"><?php next_posts_link(' Older Entries &raquo;') ?></div>
            <br class="fix" />
            <?php } ?> 
        </div>        
              
    </div><!-- .col-left ends -->

    <div class="col-right">
        <?php get_sidebar(); ?>
    </div>
        <!--/div--><!--div col-left home-->
</div><!--div content-->
    <!-- Content Ends -->
 
revise los divs y estan cerrados correctamente, mas bien debe ser las propiedades styles

aqui te pongo el code un poco mas ordenado...

Inserir CODE, HTML ou PHP:
<!-- Content Starts -->
<div id="content" class="wrap"><!--div content-->

    <!-- estrenos starts -->
    <div class="estrenos">
        <div class="tituloslide"><a target="_parent" title="New Movies" href="http://moviestown.org/news/movies"><strong>New Movies</strong></a></div>
        <?php $my_query = new WP_Query('showposts=8&cat=1'); ?>
        <?php while ($my_query->have_posts()) : $my_query->the_post();?>    
    
        <div class="slideshow">
            <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php woo_get_image('image','83','125'); ?></a>   
        </div>
        <?php endwhile; wp_reset_query(); ?>
    </div>
    <!-- estrenos ends -->
    
    <div class="ads-top"><!-- codigo de publicidad--></div>
    <div class="ads-top"><!-- codigo de publicidad --></div>
    <div class="ads-top"><!-- codigo de publicidad --></div>

    <div class="col-left home"><!--div col-left home-->
        
        <?php if (is_paged()) $is_paged = true; ?>
        <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("paged=$paged"); ?>
        <?php if (have_posts()) : $count = 0; $boxcount = 0;?>
        <?php while (have_posts()) : the_post(); $count++; ?>
            <?php if ($count == 1 && get_option('woo_home_featured') == "true" && !$is_paged) : ?>
            <div id="main"><!--div main-->
                <div id="main-content"><!--div main-content-->                                                                           
                    <?php echo woo_get_embed('embed','640','360'); ?>
                    <!-- Post Starts -->
                    <div class="post wrap"><!--div post wrap-->
                        <?php echo get_avatar( get_the_author_id(), '37' ); ?>

                        <div class="fl">
                            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                            <p class="post-details">Posted on <?php the_time('d. M, Y'); ?> by  <?php the_author_posts_link(); ?> in <?php the_category(', ') ?></p>
                        </div>
                        
                        <div class="comment-cloud fr">
                            <a href="<?php comments_link(); ?>"><?php comments_number('0','1','%'); ?></a>
                        </div>                   
                        <?php if(function_exists('the_ratings')) { echo '<div class="fr ratings">'; the_ratings(); echo '</div>'; } ?>
                        
                        <div class="fix"></div>
                        
                        <?php if (get_option('woo_home_content') == "true") the_content(); ?>
                    </div><!--div post wrap-->
                    
                    <!-- Post Ends -->
                                                        
                    <?php if (get_option('woo_ad_content_disable') == "false") { ?>            
                        <?php include (TEMPLATEPATH . "/ads/content_ad.php"); $ad_shown = true; ?>
                    <?php }    ?>

                </div><!--div main-content-->
            </div><!--div main-->
            <!-- main ends -->
            
            <?php continue; endif; ?>

            <div class="video-box <?php $boxcount++; if ($boxcount == 0) { echo 'last'; } ?> ">
            
                <div class="inside">
                   <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php woo_get_image('image','166','250'); ?> </a>  
                   
                    <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
                </div>                                              
            </div>
            
           <?php if ($boxcount == 8) { $boxcount = 0; echo '<div class="fix"></div>
            <div class="ads-left"></div>
            <div class="ads-right"></div>'; } ?>

        <?php endwhile; else: ?>
            <p>Sorry, no posts matched your criteria.</p>
        <?php endif; ?>  
        
        <div class="fix"></div>

        
        <div class="more_entries">
            <?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
            <div class="alignleft"><?php previous_posts_link('&laquo; Newer Entries ') ?></div>
            <div class="alignright"><?php next_posts_link(' Older Entries &raquo;') ?></div>
            <br class="fix" />
            <?php } ?> 
        </div>        
              
    </div><!-- .col-left ends -->

    <div class="col-right">
        <?php get_sidebar(); ?>
    </div>
        <!--/div--><!--div col-left home-->
</div><!--div content-->
    <!-- Content Ends -->

Entonces algo interfiere con el código 😛 , gracias por revisarlo.
 

Tópicos similares

U
Respostas
6
Visitas
293
Usuario eliminado 138186
U
J
Respostas
66
Visitas
3K
jfinfluencer
J
P
Respostas
0
Visitas
386
pulgatomika
P
Voltar
Topo