这个before-title
和after-title
参数传递给register_sidebar()
需要使用下划线:
register_sidebar(array(
"name" => "Home Consulatation",
"id" => "home_consult",
"before_widget" => "",
"after_widget" => "",
"before_title" => "",
"after_title" => ""
));
如果使用该选项,标题将不会有任何标记。您需要将它们提供给
before_title
和
after_title
参数,如:
register_sidebar(array(
"name" => "Home Consulatation",
"id" => "home_consult",
"before_widget" => "",
"after_widget" => "",
"before_title" => "<h1>",
"after_title" => "</h1>"
));
您的问题是使用了错误的密钥(与
-
而不是
_
), 所以它使用默认值。