Advertisement
aknath

Untitled

Jul 28th, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Marketpress Category
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <div id="mid">
  8.     <div id="content" class="grid_8">
  9.         <?php
  10.             if( has_term( 'Members Only', 'product_category' ) ) {
  11.                     $url =  $_SERVER[REQUEST_URI];
  12.                     if (strpos($url, "members-only")) {
  13.                         if ( !is_user_logged_in() ) {
  14.                             header("Location:
  15. http://essentialsboutique.thinkbigwebsites.com/vip-area");
  16.                             die();
  17.                         }
  18.                     } elseif (!strpos($url, "category")) {
  19.                         if ( !is_user_logged_in() ) {
  20.                             header("Location: http://essentialsboutique.thinkbigwebsites.com/vip-area");
  21.                             die();
  22.                         }
  23.                     }
  24.                 }
  25.              ?>
  26.             <div class="post" id="post-<?php the_ID(); ?>">
  27.                 <div class="entry">
  28.                     <h2><?php single_cat_title('Product Category: '); ?></h2>
  29.                         <div class="entry single-category">
  30.                             <?php mp_list_products(); ?>
  31.                             <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  32.                         </div>
  33.                 </div>
  34.             </div>
  35.        
  36.         <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
  37.     </div>
  38. </div>
  39. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement