AgenceRegard

page.php

Nov 18th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <?php
  2.  
  3. global $post;
  4. the_post();
  5. $st_page_options = $st_page_builder = get_page_builder_options($post->ID);
  6. $builder_content = get_page_builder_content($post->ID);
  7. $showTitle= true;
  8.  
  9.  
  10. if(empty($st_page_options['page_options']['show_title']) || $st_page_options['page_options']['show_title']==''){
  11. $showTitle = false;
  12. }
  13.  
  14. $showContent = true;
  15. if(empty($st_page_options['page_options']['show_content']) || $st_page_options['page_options']['show_content']==''){
  16. $showContent = false;
  17. }
  18.  
  19. if(empty($st_page_options)){ // if $st_page_options not set that mean this page created by other theme
  20. $showContent = true;
  21. $showTitle = true;
  22. }
  23.  
  24. if($showTitle):
  25.  
  26. ?>
  27. <h1 class="page-title"><?php the_title(); ?></h1>
  28. <?php endif; ?>
  29. <div <?php post_class('content clearfix'); ?>>
  30. <?php
  31. do_action('st_before_page_content',$post);
  32. if($showContent){
  33. echo '<div class="post-entry">';
  34. the_content();
  35. echo '</div>';
  36. }
  37. echo '<div class="post-bc">';
  38. echo do_shortcode($builder_content) ;
  39. echo '</div>';
  40. do_action('st_after_page_content',$post);
  41.  
  42. ?>
  43.  
  44.  
  45. <?php $args = array(
  46. 'before' => '<p>' . __('Pages:','magazon'),
  47. 'after' => '</p>',
  48. 'link_before' => '',
  49. 'link_after' => '',
  50. 'next_or_number' => 'number',
  51. 'nextpagelink' => __('Next page','magazon'),
  52. 'previouspagelink' => __('Previous page','magazon'),
  53. 'pagelink' => '%',
  54. 'echo' => 1
  55. );
  56. ?>
  57. <?php wp_link_pages( $args );
  58.  
  59. if(st_get_setting('enable_page_comments','n')=='y'){
  60. comments_template('', true );
  61. }
  62.  
  63. ?>
  64. </div>
Advertisement
Add Comment
Please, Sign In to add comment