Guest User

Untitled

a guest
Dec 30th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 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_customizer_option($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 = 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.  
  53. //increment the views counter
  54. td_page_views::update_page_views($post->ID);
  55.  
  56.  
  57. echo td_page_generator::wrap_start();
  58. ?>
  59. <div class="span2"></div>
  60. <div class="span8 column_container" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">
  61. <?php
  62. get_template_part('loop', 'simple');
  63. comments_template('', true);
  64. ?>
  65. </div>
  66. <div class="span2"></div>
  67. <?php
  68. echo td_page_generator::wrap_end();
  69. get_footer();
  70.  
  71.  
  72.  
  73.  
  74. ?>
Advertisement
Add Comment
Please, Sign In to add comment