• hi ;
    when i use the_excerpt();
    i will disappear sidebar ,
    Why??!!
    please HELP ME

    index.php

    <?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: https://codex.www.ads-software.com/Template_Hierarchy
     *
     * @package pir-Javid
     */
    
    get_header(); ?>
    
    	<section class="feature-image feature-image-default-alt" data-type="background" data-speed="2">
    		<h1 class="page-title">Blog</h1>
    	</section>
    
    <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=BLOG CONTENT=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
    	<div class="container">
    		<div id="primary" class="row">
    			<main id="content" class="col-sm-8" role="main">
    				<?php if ( have_posts() ) : ?>
    
    					<?php if ( is_home() && ! is_front_page() ) : ?>
    						<header>
    							<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
    						</header>
    					<?php endif; ?>
    
    					<?php /* Start the Loop */ ?>
    					<?php while ( have_posts() ) : the_post(); ?>
    
    						<?php
    
    						/*
                             * Include the Post-Format-specific template for the content.
                             * If you want to override this in a child theme, then include a file
                             * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                             */
    						get_template_part( 'template-parts/content', get_post_format() );
    						?>
    
    					<?php endwhile; ?>
    
    					<?php the_posts_navigation(); ?>
    
    				<?php else : ?>
    
    <!--					--><?php //get_template_part( 'template-parts/content', 'none' ); ?>
    
    <!--					--><?php //get_template_part( 'content', get_post_format() ); ?>
    
    				<?php endif; ?>
    			</main>	<!-- content -->
    			<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=SIDEBAR=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
    			<aside class="col-sm-4 widgetleft">
    				<?php get_sidebar(); ?>
    			</aside><!-- col -->
    			</div><!-- primary -->
    		</div><!-- container -->
    
    <?php get_footer(); ?>

    content.php

    <?php
    ///**
    // * Template part for displaying posts.
    // *
    // * @package pir-Javid
    // */
    //
    //?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<?php the_title( sprintf( '<h3 class="entry-title"><a href="" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' ); ?>
    
    		<?php if ( 'post' == get_post_type() ) : ?>
    			<div class="post-details">
    				<i class="fa fa-user"></i> <?php the_author(); ?>
    				<i class="fa fa-clock-o"></i> <time><?php the_date(); ?></time>
    				<i class="fa fa-folder-open"></i> <?php the_category(', '); ?>
    				<i class="fa fa-tags"></i><?php the_tags('', ', ', ''); ?>
    				<?php pir_javid_posted_on(); ?>
    				<div class="post-comments-badge">
    					<a href=""><i class="fa fa-comments"></i><?php comments_number(0,1,'%');?></a>
    				</div><!-- post-comments-badge -->
    				<div><?php edit_post_link( ' edit','<div><i class="fa fa-pencil"></i>','</div>' ); ?></div>
    			</div><!-- post-details -->
    		<?php endif; ?>
    	</header><!-- .entry-header -->
    	<div class="post-image">
    		<?php if ( has_post_thumbnail() ) { ?>
    		<?php the_post_thumbnail();?>
    		<?php  } ?>
    	</div> <!-- Post-Image -->
    
    	<div class="post-excert">
    		<?php
    
    			the_excerpt();
    		?>
    
    	</div><!-- post-excpert -->
    </article><!-- #post-## -->

    this my problem :

    <div class="post-excert">
    		<?php
    
    			the_excerpt();
    		?>
    
    	</div><!-- post-excpert -->

    if i hide this , my problem solve!

Viewing 3 replies - 1 through 3 (of 3 total)
  • try and enable DEBUG to see if you get any erro messages – https://codex.www.ads-software.com/Debugging_in_WordPress

    if you look into the html code as you see it in the browser with ‘View Source’ or similar, does the code simply stop at the location of the excerpt?

    what happens if you temporarily deactivate all plugins?

    can you provide a live link to your site with the error visible?

    Thread Starter frhng

    (@frhng)

    what happens if you temporarily deactivate all plugins?
    Thanks a lot !
    deactivate all plugins and problem solved!
    But still i dont know which plug-in problem

    to find out which plugin was causing the problem, re-activate one plugin at a time and test inbetween.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the_excerpt();’ is closed to new replies.