• Resolved dionizioaf

    (@dionizioaf)


    I’m developing a custom WordPress site, in Blog section i used the widget WordPress sidebar, and when a use search widget to find a word that exist in the site, it works fine, but when i search for a missing word in the site, the side breaks, all the stylesheet and JS dont get included. Any code inside the <head> loads, i insert a custom css inside the <head> to make a try but it didnt load either.

    <?php get_header(); ?>
    
            <div class="row" align="center" >
                <!-- Wrap the .navbar in .container to center it within the absolutely positioned parent. -->
                <div class="container"> <div style="height: 60px;width: 100%"></div>
                    <div style="width: 90%;text-align: left;margin-bottom: 100px;margin-top: 20px;" class="contentinfo">
    
    			<?php// if ( have_posts() ) : ?>
                                   <h1> Resultado da busca por: <?php echo $s; ?> </h1>
    
    				<?php while ( have_posts() ) : the_post(); ?>
                                                    <div class="span9" style="text-align: left;margin-top: 50px;">
                                                        <h1 style="font-size: 18.5px;"><?php the_title(); ?></h1>
                                                        <hr />
                                                        <div class="span2 post_thumb div-img-circle">
                                                            <a href="<?php the_permalink(); ?>">
                                                                <?php echo the_post_thumbnail(); ?>
                                                            </a>
                                                        </div>
                                                        <div class="span6" style="text-align: justify;">
                                                            <a href="<?php the_permalink(); ?>" style="text-decoration: none;">
    
                                                                <?php the_excerpt(); ?>
                                                            </a>
                                                            <div style="width: 100%;text-align: right">
                                                                <a href="<?php the_permalink(); ?>">Leia Mais</a>
                                                            </div>
                                                        </div>
                                                    </div>
                                    <?php endwhile;
    				//else :
                                    ?>
    <!--                                    <div class="span9" style="text-align: left;margin-top: 50px;">
                                            <h1 style="font-size: 18.5px;">N?o encontramos nenhuma informa??o pela busca de: <?php echo $s; ?></h1>
                                        </div>-->
                                    <?php
    				//endif;
    			?>
    		</div><!-- #content -->
    	</div><!-- #primary -->
            </div>        
    
    <?php
    get_footer();
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dionizioaf

    (@dionizioaf)

    I Also remove the While leaving only

    <?php get_header(); ?>
    
            <div class="row" align="center" >
                <!-- Wrap the .navbar in .container to center it within the absolutely positioned parent. -->
                <div class="container"> <div style="height: 60px;width: 100%"></div>
                    <div style="width: 90%;text-align: left;margin-bottom: 100px;margin-top: 20px;" class="contentinfo">
    			<?php// if ( have_posts() ) : ?>
                                   <h1> Resultado da busca por: <?php echo $s; ?> </h1>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
            </div>        
    
    <?php
    get_footer();

    And still got the problem

    Thread Starter dionizioaf

    (@dionizioaf)

    I could not solve the problem.
    I make a copy of twelve theme folder and copy the content of my custom files inside the same files in the new folder and it just work.

    Thanks anyway

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code inside not working when search.php doesnt find the word’ is closed to new replies.