Guest User

the_content

a guest
Feb 16th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <?php if (is_single()): ?>
  2.     <div class="col-left">
  3.     <?php if(is_user_logged_in()):
  4.         //more前の記事 TextAgroup
  5.         $content = get_the_content();
  6.         $content = preg_replace("|(<img[^>]+>)|si","",$content);
  7.         echo $content;
  8.     else:
  9.         //more後の記事 TextBgroup
  10.         global $more;
  11.         $more = 0;
  12.         $content = get_the_content('' , FALSE, '');
  13.         $content = preg_replace("|(<img[^>]+>)|si","",$content);
  14.         echo $content;
  15.         if ($pos=strpos($post->post_content, '<!--more-->')):
  16.             echo '<a href="#">ログイン</a>';
  17.         endif;
  18.     endif; ?>
  19.     </div>
  20.  
  21.     <div class="col-right">
  22.     <?php if(is_user_logged_in()):
  23.      // ImgAgroupおよびImgBgroup????????
  24.     else:
  25.      // ImgAgroupのみ
  26.     post_linkingthumbs();
  27.     endif; ?>
  28.     </div>
  29. <?php else: ?>
  30.     <h1 class="page-title"><?php the_title(); ?></h1>
  31.     <?php the_content(); ?>
  32. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment