【发布时间】:2014-02-27 14:41:33
【问题描述】:
在我的 Wordpress 网站上,我的 archive.php 在右侧有一个侧边栏。
我正在使用 WP 下载管理器插件,并且该插件中的类别也使用了我的主题中的 archive.php 模板文件。但是在这些类别页面上,我想在左侧显示侧边栏(默认为左侧)。
现在,在我的 archive.php 中,当使用 WP 下载管理器时,我有一个自定义代码可以在侧边栏区域调用自定义侧边栏:
//get the sidebar for support
if ( 'wpdmpro' == get_post_type() ) {
echo '<aside class="sidebar sidebar_right smartphones_sidebar_active three alpha units" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar"><div class="inner_sidebar extralight-border">';
dynamic_sidebar( 'Support' );
echo '</div></aside>';
}
检查http://wptest.alcadis.nl/downloads/was-105r/。 这是右侧边栏的示例页面。我希望它在此自定义帖子类型的左侧。
【问题讨论】:
标签: wordpress