1
我重構一個WordPress的網站,我有在function.php註冊爲側邊欄有些構件爲什麼wordpress dymanic_sidebar在錨文本的title屬性中顯示類別描述?
註冊的側邊欄的一個大問題:
register_sidebar(array(
'name' => 'sidebar 1',
'id' => 'sidebar_1',
'before_title' => '<div class="box_sidebar_heading"><h4>'.WPEX_Theme_Options::get_theme_option('titolo_sidebar_1').'<span style="display: none;">',
'after_title' => '</span></h4></div>',
'before_widget' => '',
'after_widget' => '',
));
此欄必須顯示一個類別列表,稱爲通過簡單的功能
<?php
if (is_active_sidebar('sidebar_1')) : ?>
<div class="box_sidebar col-xs-12 col-sm-12 col-md-12">
<?php dynamic_sidebar('sidebar_1'); ?>
</div><!-- #primary-sidebar -->
<?php endif; ?>
在後臺的每個類別都有一個由文本和圖像組成的wysiwyg複雜的描述。
問題是生成類別的HTML列表的系統函數放在錨點的title =「」屬性中,類別描述是在wysiwyg中的類別描述。
的結果是這樣的:
<ul class="nav nav-list nav-stacked box_sidebar_list">
<li class="cat-item cat-item-6 current-cat"><a href="http://www.test-site.com/category/my-category/" title="
Title of the image
Title of the paragraph
Title of the footer
">My category</a>
</li>
</ul>
因爲它是用來acorss的網站,我無法找到如何在標題中把另一variabile的文檔,我不能刪除該類別描述=」 「的主播。
謝謝。