我一直在为我的worpress网站离线工作这个代码错误.
解析错误:语法错误,第169行的C:\ Users\guyzer\Desktop\InstantWP_4.3\iwpserver\htdocs\wordpress\wp-content\themes\thesis_182\custom\custom_functions.php中的意外'['
行代码错误行169: $post_date = explode(" ", $post_event)[0];
在实际站点上,站点正在运行,但是当我使用复制器复制实时站点并转移到脱机或其他服务器时,始终会发生此错误,从而导致站点关闭.希望你能帮我解决这个错误!
以下是错误的完整代码:
<div class="page">
<div class="tab-sidebars">
<h1><a href="<?php echo get_site_url()?>/gigs">GIGS</a></h1>
<h3><a href="<?php echo get_site_url()?>/gigs/today">• Today</a></h3>
<h3><a href="<?php echo get_site_url()?>/gigs/weeks">• Weeks</a></h3>
<h3><a href="<?php echo get_site_url()?>/gigs/month">• Month</a></h3>
</div>
<div id="gigs-carousel" class="post-container">
<a class="buttons prev" href="#"></a>
<div class="viewport">
<ul class="overview" style="width:9999px !important">
<?php
global $post;
$today = getdate();
$args = array( 'category_name' => 'gigs',
'post_type' => 'post',
'meta_key' => custom_event_date,
'orderby' => meta_value,
'order' => 'ASC',
'showposts' => '99'
);
$the_query = new WP_Query($args); …Run Code Online (Sandbox Code Playgroud)