خطا رو اینجا بزارید بررسی بشه
خطا میده که لاین ۳ ایراد داره.
ببنید بهتره شما هر دو قالب رو داخل فایل php جدا ذخیره کنید و تو کد بالا include کنید اگه سورس صفحه باشه عرض میکنم چکار کنید.
بله این رو هم با کد شما تست کردم اما بازم نشد. کدها و توضیحات رو در ادامه میذارم:
کد فایل tag پیشفرض:
PHP:
<?php get_header(); ?>
<?php include(TEMPLATEPATH."/single-header.php");?>
<div class="container-flu" id="main">
<div class="row" id="posts">
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 shadow" id="posts-main-style">
<div class="block-title-tc">
<h1><?php single_cat_title(); ?></h1>
</div>
<div class="posts-list">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="list-of-items">
<div class="post-item row">
<div class="image-item col-xs-4 col-right">
<div class="post-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
</a>
</div>
</div>
<div class="post-body-main col-xs-8 col-left">
<div class="post-body">
<div class="post-body-content">
<div class="post-body-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a>
</div>
<div class="post-body-excerpt visible-lg">
<?php the_excerpt(); ?>
</div>
</div>
</div>
</div>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php ggir1_numeric_posts_nav(); ?>
</div>
<div class="sidef col-lg-4 col-md-4 col-sm-12 col-xs-12">
<?php include(TEMPLATEPATH."/tax-side.php");?>
</div>
</div>
<?php get_footer(); ?>
کد فایل tag مربوط به تگ های خاص:
PHP:
<?php get_header(); ?>
<?php include(TEMPLATEPATH."/single-header.php");?>
<div class="container-flu" id="main">
<div class="row lastarts">
<div class="wt-title">
<h1><?php single_cat_title(); ?></h1>
</div>
<div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="list-of-items col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="lastarts-cdr">
<div class="w-image">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
</a>
</div>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php ggir1_numeric_posts_nav(); ?>
</div>
<div class="single-post-content cat-des workout-dec"><?php echo category_description(); ?></div>
<?php get_footer(); ?>
کدی که شما دادید و من تست کردم:
PHP:
<?php
if( is_tag('734') or is_tag('735') ){
<?php get_header(); ?>
<?php include(TEMPLATEPATH."/single-header.php");?>
<div class="container-flu" id="main">
<div class="row lastarts">
<div class="wr-title">
<h1><?php single_cat_title(); ?></h1>
</div>
<div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="list-of-items col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="lastarts-cdr">
<div class="wr-image">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
</a>
</div>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php ggir1_numeric_posts_nav(); ?>
</div>
<div class="single-post-content cat-des workout-dec"><?php echo category_description(); ?></div>
<?php get_footer(); ?>
}else{
<?php get_header(); ?>
<?php include(TEMPLATEPATH."/single-header.php");?>
<div class="container-flu" id="main">
<div class="row" id="posts">
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 shadow" id="posts-main-style">
<div class="block-title-tc">
<h1><?php single_cat_title(); ?></h1>
</div>
<div class="posts-list">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="list-of-items">
<div class="post-item row">
<div class="image-item col-xs-4 col-right">
<div class="post-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
</a>
</div>
</div>
<div class="post-body-main col-xs-8 col-left">
<div class="post-body">
<div class="post-body-content">
<div class="post-body-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a>
</div>
<div class="post-body-excerpt visible-lg">
<?php the_excerpt(); ?>
</div>
</div>
</div>
</div>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php ggir1_numeric_posts_nav(); ?>
</div>
<div class="sidef col-lg-4 col-md-4 col-sm-12 col-xs-12">
<?php include(TEMPLATEPATH."/tax-side.php");?>
</div>
</div>
<?php get_footer(); ?>
}
?>
و در آخر هم کد فایل tag که با توجه به کد شما سعی کردم دو فایل مجزا برای تگ ها بسازم و اونها رو اینکلود کنم:
PHP:
<?php
if( is_tag('734') or is_tag('735') ){
<?php include(TEMPLATEPATH."/tagspecial.php");?>
}else{
<?php include(TEMPLATEPATH."/taggeneral.php");?>
}
?>