2015-12-08 90 views
-4

我使用的是WordPress主题,并出现以下分析错误:解析错误:语法错误,意外的':',期待','或';'

Parse error: syntax error, unexpected ':', expecting ',' or ';' in /home/storage/9/ad/41/hunamarcenaria1/public_html/wp-content/themes/blink/page.php on line 1

<?php get_header(); ?> 
<?php get_template_part('includes/page-title'); ?> 
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
<div class="centered-wrapper"> 
    <section class="percent-page> 
     <?php echo $deliciousmt:delicious_sidebar_position($post->ID); ?> 
     <article id="page-<?php the_ID(); ?>" class="begin-content"> 
      <?php the_content(); ?> 
     </article> 
     <?php 
      // If comments are open or we have at least one comment, load up the comment template. 
      if (comments_open() || get_comments_number()) : 
       comments_template(); 
      endif;  
     ?>   
     <div class="double-space"></div> 
    </section>  
    <?php endwhile; ?> 
<?php endif; ?>    
<?php 
    global $dt_sidebar_pos; 
    if(($dt_sidebar_pos === 'sidebar-right') || ($dt_sidebar_pos === 'sidebar-left')) 
     get_sidebar();  
?> 
</div><!--end centered-wrapper--> 
<?php get_footer(); ?> 

我不是一个程序员,我试图解决这个问题,但我不知道该怎么做。如果任何人都可以帮助我,那将是惊人的!

+0

回车符对于使代码可读性非常有用。如果您的代码被设计为可供人类阅读,那么您将更容易发现代码中的错误。 – David

回答

-1

这是错误的

<?php echo $deliciousmt:delicious_sidebar_position($post->ID); ?> 
        ^

使用.操作

<?php echo $deliciousmt." : ".delicious_sidebar_position($post->ID); ?> 

下一页校正

<section class="percent-page> 

缺少的结束"

<section class="percent-page"> 
          ^
相关问题