Guest User

Untitled

a guest
Jan 3rd, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. <?php
  2. global $loop_module_id, $loop_sidebar_position, $post;
  3.  
  4.  
  5. td_global::load_single_post($post);
  6.  
  7.  
  8. /* ----------------------------------------------------------------------------
  9. the post template (single article template)
  10. */
  11.  
  12. get_header();
  13.  
  14.  
  15. /* used by
  16. /includes/app/modules/module_modifier/td_module_blog.php
  17. /sidebar.php
  18. */
  19.  
  20.  
  21.  
  22. //set the template id, used to get the template specific settings
  23. $template_id = 'home'; //home = blog index = blog - use the same settings from the blog index
  24.  
  25. //prepare the loop variables
  26.  
  27. //read the global settings
  28. $loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
  29. $loop_module_id = 1; //use the default 1 module (full post)
  30.  
  31.  
  32.  
  33. //print_r($td_post_theme_settings);
  34.  
  35. //read the primary category sidebar position! - we have to make the page after the primary category or after the global setting
  36. $primary_category_id = td_global::get_primary_category_id();
  37. if (!empty($primary_category_id)) {
  38. $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');
  39. if (!empty($tax_meta_sidebar)) {
  40. //update the sidebar position from the category setting
  41. $loop_sidebar_position = $tax_meta_sidebar;
  42. }
  43. }
  44.  
  45.  
  46. //read the custom single post settings - this setting overids all of them
  47. $td_post_theme_settings = get_post_meta($post->ID, 'td_post_theme_settings', true);
  48. if (!empty($td_post_theme_settings['td_sidebar_position'])) {
  49. $loop_sidebar_position = $td_post_theme_settings['td_sidebar_position'];
  50. }
  51.  
  52. //send the sidebar position to gallery
  53. td_global::$cur_single_template_sidebar_pos = $loop_sidebar_position;
  54.  
  55. //increment the views counter
  56. td_page_views::update_page_views($post->ID);
  57.  
  58.  
  59. locate_template('single_template_3.php', true);
  60.  
  61. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment