WordPress.org

Ready to get started?Download WordPress

Forums

Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE) (2 posts)

  1. pythonidea
    Member
    Posted 1 year ago #

    I have installed classifiedstheme in my local and I have download the classifiedstheme child theme from our live to my local. when I try to run my wp in my local I get these error:

    Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE) in C:\xampp\htdocs\twh\wp-content\themes\classifiedstheme\themes\classifiedstheme-warmblood\_functions.php on line 90

    I dont know the cause of the error, can anyone can help me about my case? I am trying to solve this error on a week.

    any help will be appreciated, thanks in advance ...

    this is the code of _functions.php:

    <?php
    /* =============================================================================
       1. PAGE HOOKS
       ========================================================================== */
    
    function hook_premiumpress_top(){
    
    }
    add_action('premiumpress_top','hook_premiumpress_top');
    
    function hook_premiumpress_bottom(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_bottom','hook_premiumpress_bottom');
    
    /* =============================================================================
       2. Header Hooks & Filters
       ========================================================================== */
    
    function hook_premiumpress_header_before(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_header_before','hook_premiumpress_header_before');
    
    function hook_premiumpress_header_inside(){
    		global $wpdb,$PPT;
    		return '<section class="container section-header">
    		<div class="row">
    		 <header class="logo col4">
    		<h1> <a href="'.$GLOBALS['bloginfo_url'].'/" title="'.get_bloginfo('name').'"><img src="'.$PPT->Logo(true).'" alt="'.get_bloginfo('name').'" /></h1>
    		</a>
    		</header>
    		</div>
    		</section> <!-- end section -->';
    }
    add_action('premiumpress_header_inside','hook_premiumpress_header_inside');
    
    function hook_premiumpress_header_after(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_header_after','hook_premiumpress_header_after');
    
    /* =============================================================================
       3. Menu Hooks & Filters
       ========================================================================== */
    
    function hook_premiumpress_menu_before(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_menu_before','hook_premiumpress_menu_before');
    
    function hook_premiumpress_menu_inside($content){
    // YOUR CONTENT HERE
    return $content;
    }
    add_action('premiumpress_menu_inside','hook_premiumpress_menu_inside');
    
    function hook_premiumpress_menu_after(){ 
    
    ?>
    
    <section class="container section-featured">
      <div class="row">
        <div class="featured-listing">
          <div class="inner-container">
          <h3 class="heading">Featured Listing</h3>
    
        <?php
    				global $post,$PPT;
    				$my_query = new WP_Query('meta_key=featured&meta_value=yes&orderby=rand&showposts=4');
    				 $listing_image = get_post_meta($post->ID,'featured_image',true);
    				/*//add_image_size( 'featured_image', 744, 481, true ); // page and post gallery thumb size*/
    				 if( !empty($listing_image) ){?>
    
       <ul class="slides">
                   <? $postnum = $my_query->post_count;
    				while ($my_query->have_posts()) : $my_query->the_post(); $postnum = $postnum - 1; ?>
    
    					<li class="listing-slide slide-<?php echo $count; ?> post-slide-<?php echo $post->ID; ?>">
                        <header>
                <h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
                 <p class="slide-excerpt"><?php the_excerpt(); ?></p>
                 <?php $listing_discount = get_post_meta($post->ID,'sale-price',true);
    			 if( !empty($listing_discount) ){ ?><div class="sale-price"> <?php echo $listing_discount; ?>% <strong>Sale</strong></div><?php } ?>
                    </header>
                        <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img title="<?php the_title(); ?>" alt="<?php the_title(); ?>" src="<?php echo get_option("imagestorage_link"); ?><?php echo get_post_meta($post->ID, "featured_image", true); ?>" width="744" height="481" /></a></li>            
    
    				<?php endwhile; } ?>
    				</ul>
    
          </div><!-- .inner-container -->
        </div>
        <!-- /.featured-listing -->
    
    	<div class="category-listing">
           <?php wp_nav_menu( array('menu' => 'Secondary Menu', 'container' => 'ul', 'menu_class' => 'sidemenu', 'container_class' => 'category-listing')); ?>
        </div>
       </div>
    </section>
    <? }
    add_action('premiumpress_menu_after','hook_premiumpress_menu_after');
    
    /* =============================================================================
       4. Sub Menu Hooks & Filters
       ========================================================================== */
    
    function hook_premiumpress_submenu_before(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_submenu_before','hook_premiumpress_submenu_before');
    
    function hook_premiumpress_submenu_inside($content){
    // YOUR CONTENT HERE
    return $content;
    }
    add_action('premiumpress_submenu_inside','hook_premiumpress_submenu_inside');
    
    function hook_premiumpress_submenu_after(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_submenu_after','hook_premiumpress_submenu_after');
    
    /* =============================================================================
       5. Page Hooks
       ========================================================================== */
    
    function hook_premiumpress_page_before(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_page_before','hook_premiumpress_page_before');
    
    function hook_premiumpress_page_after(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_page_after','hook_premiumpress_page_after');
    
    /* =============================================================================
       6.Content Hooks
       ========================================================================== */
    
    function hook_premiumpress_content_before(){ 
    
     }
    add_action('premiumpress_content_before','hook_premiumpress_content_before');
    
    function hook_premiumpress_content_after(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_content_after','hook_premiumpress_content_after');
    
    /* =============================================================================
       7.Left Sidebar Hooks
       ========================================================================== */
    
    function hook_premiumpress_sidebar_left_top(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_sidebar_left_top','hook_premiumpress_sidebar_left_top');
    
    function hook_premiumpress_sidebar_left_bottom(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_sidebar_left_bottom','hook_premiumpress_sidebar_left_bottom');
    
    /* =============================================================================
       8.Middle Hooks
       ========================================================================== */
    
    function hook_premiumpress_middle_top(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_middle_top','hook_premiumpress_middle_top');
    
    function hook_premiumpress_middle_bottom(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_middle_bottom','hook_premiumpress_middle_bottom');
    
    /* =============================================================================
       9. Right Sidebar Hooks
       ========================================================================== */
    
    function hook_premiumpress_sidebar_right_top(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_sidebar_right_top','hook_premiumpress_sidebar_right_top');
    
    function hook_premiumpress_sidebar_right_bottom(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_sidebar_right_bottom','hook_premiumpress_sidebar_right_bottom');
    
    /* =============================================================================
       10. Footer Hooks & Filters
       ========================================================================== */
    
    function hook_premiumpress_footer_before(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_footer_before','hook_premiumpress_footer_before');
    
    function hook_premiumpress_footer_inside($content){
    // YOUR CONTENT HERE
    return $content;
    }
    add_action('premiumpress_footer_inside','hook_premiumpress_footer_inside');
    
    function hook_premiumpress_footer_after(){
    // YOUR CONTENT HERE
    }
    add_action('premiumpress_footer_after','hook_premiumpress_footer_after');
    
    ?>
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Have you contacted your theme's vendors of this issue? WordPress.org forums are for the core application, themes and plugins that are distributed on WordPress.org.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags