本文整理汇总了PHP中td_global::cur_single_template_sidebar_pos方法的典型用法代码示例。如果您正苦于以下问题:PHP td_global::cur_single_template_sidebar_pos方法的具体用法?PHP td_global::cur_single_template_sidebar_pos怎么用?PHP td_global::cur_single_template_sidebar_pos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_global
的用法示例。
在下文中一共展示了td_global::cur_single_template_sidebar_pos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$tax_meta_sidebar = td_util::get_category_option($primary_category_id, 'tdc_sidebar_pos');
//swich by RADU A, get_tax_meta($primary_category_id, 'tdc_sidebar_pos');
if (!empty($tax_meta_sidebar)) {
//update the sidebar position from the category setting
$loop_sidebar_position = $tax_meta_sidebar;
}
}
//read the custom single post settings - this setting overids all of them
$td_post_theme_settings = get_post_meta($post->ID, 'td_post_theme_settings', true);
if (!empty($td_post_theme_settings['td_sidebar_position'])) {
$loop_sidebar_position = $td_post_theme_settings['td_sidebar_position'];
}
//set the content width if needed (we already have the default in functions)
if ($loop_sidebar_position == 'no_sidebar') {
$content_width = 980;
}
//send the sidebar position to gallery
td_global::$cur_single_template_sidebar_pos = $loop_sidebar_position;
//increment the views counter
td_page_views::update_page_views($post->ID);
//added by Radu A. check if this post have a post template to be display with.
//if not use the default site post template from Theme Panel -> Post Settings -> Default site post template
$td_default_site_post_template = td_util::get_option('td_default_site_post_template');
if (empty($td_post_theme_settings['td_post_template']) and !empty($td_default_site_post_template)) {
$td_post_theme_settings['td_post_template'] = $td_default_site_post_template;
}
// sidebar position used to align the breadcrumb on sidebar left
$td_sidebar_position = '';
if ($loop_sidebar_position == 'sidebar_left') {
$td_sidebar_position = 'td-sidebar-left';
}