Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. <?php
  2. /**
  3. * Post Content Template
  4. *
  5. * This template is the default page content template. It is used to display the content of the
  6. * `single.php` template file, contextually, as well as in archive lists or search results.
  7. *
  8. * @package WooFramework
  9. * @subpackage Template
  10. */
  11.  
  12. /**
  13. * Settings for this template file.
  14. *
  15. * This is where the specify the HTML tags for the title.
  16. * These options can be filtered via a child theme.
  17. *
  18. * @link http://codex.wordpress.org/Plugin_API#Filters
  19. */
  20.  
  21. $settings = array(
  22. 'thumb_w' => 100,
  23. 'thumb_h' => 100,
  24. 'thumb_align' => 'alignleft',
  25. 'post_content' => 'excerpt',
  26. 'comments' => 'both',
  27.  
  28.  
  29.  
  30.  
  31. );
  32.  
  33. $settings = woo_get_dynamic_values( $settings );
  34.  
  35. $title_before = '<h1 class="title entry-title">';
  36. $title_after = '</h1>';
  37.  
  38. if ( ! is_single() ) {
  39. $title_before = '<h2 class="title entry-title">';
  40. $title_after = '</h2>';
  41. $title_before = $title_before . '<a href="' . esc_url( get_permalink( get_the_ID() ) ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">';
  42. $title_after = '</a>' . $title_after;
  43. }
  44.  
  45. $page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) );
  46.  
  47. woo_post_before();
  48. ?>
  49. <article <?php post_class(); ?>>
  50. <?php
  51. woo_post_inside_before();
  52.  
  53. if (is_archive() ) {
  54. if (has_post_thumbnail() ) { the_post_thumbnail('prop-img', array( 'class' => 'propimg' ));
  55. } else {
  56. echo '<img class="prop-image" src="http://legacylandsllc.com/wp/wp-content/uploads/2016/03/IMG_4938-700x5255-1.jpg" width=600 />';
  57. }
  58. }
  59.  
  60. if (! is_archive() ) { ?>
  61. <header>
  62. <?php the_title( $title_before, $title_after ); ?>
  63. </header>
  64. <?php }
  65.  
  66.  
  67. if (is_single() ) { include(locate_template('/includes/prop-top.php')); }
  68. ?>
  69.  
  70.  
  71. <section class="entry">
  72.  
  73. <?php
  74.  
  75. if (is_archive() ) {
  76. the_title($title_before,$title_after);
  77. if ( get_post_meta($post->ID, "_spprice", true) != '') { ?>
  78.  
  79. <p>Price: $<?php $key="_spprice"; echo number_format(get_post_meta($post->ID, $key, true) ); ?></p>
  80.  
  81. <?php };
  82. }
  83. if ( is_single() ) { the_content( __( 'Read More &rarr;', 'woothemes' ) ); } else {
  84. the_excerpt();
  85. echo '<a class="more-link" href="' . esc_url( get_permalink( get_the_ID() ) ) . '">READ MORE &rarr; </a>'; }
  86. if ( 'content' == $settings['post_content'] || is_singular() ) wp_link_pages( $page_link_args );
  87.  
  88. ?>
  89.  
  90.  
  91. </section><!-- /.entry -->
  92. <div class="fix"></div>
  93. <?php
  94. woo_post_inside_after();
  95. ?>
  96. </article><!-- /.post -->
  97. <?php
  98. woo_post_after();
  99. $comm = $settings['comments'];
  100. if ( ( 'post' == $comm || 'both' == $comm ) && is_single() ) { comments_template(); }
  101. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement