dangermoose

content-shop

Feb 7th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.58 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Shop 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.  global $woo_options;
  21.  
  22.  $title_before = '<h1 class="title">';
  23.  $title_after = '</h1>';
  24.  
  25.  if ( ! is_single() ) {
  26.  
  27.     $title_before = '<h2 class="title">';
  28.     $title_after = '</h2>';
  29.  
  30.     $title_before = $title_before . '<a href="' . get_permalink( get_the_ID() ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">';
  31.     $title_after = '</a>' . $title_after;
  32.  
  33.  }
  34.  
  35.  $page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) );
  36.  
  37.  woo_post_before();
  38. ?>
  39. <div <?php post_class(); ?>>
  40. <?php
  41.     woo_post_inside_before();  
  42.     if ( $woo_options['woo_post_content'] != 'content' AND !is_singular() )
  43.         woo_image( 'width='.$woo_options['woo_thumb_w'].'&height='.$woo_options['woo_thumb_h'].'&class=thumbnail '.$woo_options['woo_thumb_align'] );
  44.     the_title( $title_before, $title_after );
  45.     woo_post_meta();
  46. ?>
  47.     <div class="entry">
  48.         <?php
  49.             if ( $woo_options['woo_post_content'] == 'content' || is_single() ) { the_content(__('Continue Reading &rarr;', 'woothemes') ); } else { the_excerpt(); }
  50.             if ( $woo_options['woo_post_content'] == 'content' || is_singular() ) wp_link_pages( $page_link_args );
  51.         ?>
  52.     </div><!-- /.entry -->
  53.    
  54.         <div style="display:inline-block;float:left;">
  55.         <!-- Custom field for Product ID-->
  56.                                        
  57.         <?php $values = get_post_custom_values('Product_ID',$post->ID);
  58.               if ($values){
  59.                ?>
  60.          <?php echo get_button_code_for_product($values[0]); ?>
  61.          <?php } else { ?>
  62.          <p>no btns</p>
  63.          <?php } ?>
  64.         <!-- End Custom field for Product ID-->                                  
  65.     </div>
  66.     <div class="fix"></div>
  67.     <div style="border-bottom:1px solid #382517"></div>
  68.    
  69.     <div class="fix"></div>
  70. <?php
  71.     woo_post_inside_after();
  72. ?>
  73. </div><!-- /.post -->
  74. <?php
  75.     woo_post_after();
  76.     $comm = $woo_options[ 'woo_comments' ];
  77.     if ( ( $comm == 'post' || $comm == 'both' ) && is_single() ) { comments_template(); }
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment