我在编码时遇到了一个问题。试图发展一个主题。但屏幕上显示的错误与附带的屏幕截图一样。代码附于此处。有人能帮我吗?
in functions.php
<?php
function launcher_setup_theme(){
load_theme_textdomain(\'launcher\');
add_theme_support(\'post-thumbnail\');
add_theme_support(\'title-tag\');
}
add_action(\'after_setup_theme\',\'launcher_setup_theme\');
function launcher_assets(){
//**Enqueue CSS */
wp_enqueue_style(\'launcher\',get_stylesheet_uri());
wp_enqueue_style(\'animate-css\',get_theme_file_uri(\'/assets/css/animate.css\'));
wp_enqueue_style(\'bootstrap-css\',get_theme_file_uri(\'/assets/css/bootstrap.css\'));
wp_enqueue_style(\'bootstrap-css-map\',get_theme_file_uri(\'/assets/css/style.css\'));
wp_enqueue_style(\'icomoon-css\'.get_theme_file_uri(\'/assets/css/icomoon.css\'));
//** Enqueue JS */
wp_enqueue_scripts(\'easing-jquery-js\',get_theme_file_uri(\'/assets/js/jquery.easing.1.3.js\'),
array(\'jquery\'),null,true);
wp_enqueue_scripts(\'waypoints-jquery-js\',get_theme_file_uri(\'/assets/js/jquery.waypoints.min.js\'),array(\'jquery\'),null,true);
wp_enqueue_scripts(\'bootstrap-jquery-js\',get_theme_file_uri(\'/assets/js/bootstrap.min.js\'),array(\'jquery\'),null,true);
wp_enqueue_scripts(\'countdown-jquery-js\',get_theme_file_uri(\'/assets/js/simplyCountdown.js\'),array(\'jquery\'),null,true);
wp_enqueue_scripts(\'main-js\',get_theme_file_uri(\'/assets/js/main.js\'),array(\'jquery\'),null,true);
}
add_action(\'wp_enqueue_scripts\',\'launcher_assets\');
function launcher_sidebars_left(){
//**
register_sidebar( array(
\'name\' => __( \'Footer Right\', \'launcher\' ),
\'id\' => \'footer-right\',
\'description\' => __(\'Footer\',\'launcher\'),
\'before_widget\' => \'<li id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</li>\',
\'before_title\' => \'<h2 class="widgettitle">\',
\'after_title\' => \'</h2>\',
) );
}
function launcher_sidebars_right(){
register_sidebar( array(
\'name\' => __( \'Footer Left\', \'launcher\' ),
\'id\' => \'footer-left\',
\'description\' => __(\'Footer\',\'launcher\'),
\'before_widget\' => \'<li id="%1$s" class="text right widget %2$s">\',
\'after_widget\' => \'</li>\',
\'before_title\' => \'<h2 class="widgettitle">\',
\'after_title\' => \'</h2>\',
)
);
}
add_action(\'widgets_init\',\'launcher_sidebars_right\');
add_action(\'widgets_init\',\'launcher_sidebars_left\');
in index.php
<?php
the_post();
get_header(); ?>
<body>
<div class="fh5co-loader"></div>
<aside id="fh5co-aside" role="sidebar" class="text-center" style="background-image: url(images/img_bg_1_gradient.jpg);">
<h1 id="fh5co-logo"><a href="<?php echo site_url(); ?>"><?php bloginfo(\'name\'); ?></a></h1>
</aside>
<div id="fh5co-main-content">
<div class="dt js-dt">
<div class="dtc js-dtc">
<div class="simply-countdown-one animate-box" data-animate-effect="fadeInUp"></div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-lg-7">
<div class="fh5co-intro animate-box">
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<div class="col-lg-7 animate-box">
<form action="#" id="fh5co-subscribe">
<div class="form-group">
<input type="text" class="form-control" placeholder="Enter your email">
<input type="submit" value="Send" class="btn btn-primary">
<p class="tip">Please enter your email address for early access.</p>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="fh5co-footer">
<div class="row">
<div class="col-md-6">
<?php
if(is_active_sidebar(\'footer-left\')){
dynamic_sidebar(\'footer-left\');
}
footer-left
?>
</div>
<div class="col-md-6 fh5co-copyright">
<?php
if(is_active_sidebar(\'footer-right\')){
dynamic_sidebar(\'footer-right\');
}
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>