M.Javad 684 ارسال شده در آبان 94 گزارش بازنشر ارسال شده در آبان 94 سلام آیا امکانش هست که مثلا بک گراند مطالب یه دسته بندی خاص با سایر مطالب دسته بندی های دیگه تفاوت داشته باشه؟!! نقل قول لینک به ارسال
M.Javad 684 ارسال شده در آبان 94 مالک گزارش بازنشر ارسال شده در آبان 94 این کد اصلی قالبه<article class="small_post<?php if(is_sticky()) {echo " sticky";} ?>"> <div class="top"> <div class="cats_def"> <?php $categories = get_the_category(); $separator = ''; $output = ''; if($categories){ foreach($categories as $category) { $cat_id = $category->term_id; $cat_data = get_option("category_$cat_id"); $output .= '<a href="'.get_category_link( $category->term_id ).'" class="cat-'.$cat_id.'"'; if (!empty($cat_data['cat_color'])) { $output .= ' style="color: '.$cat_data["cat_color"].' !important; "'; } $output .='>'.$category->cat_name.'</a>'.$separator; } echo trim($output, $separator); } ?> </div> <?php if (rehub_option('exclude_comments_meta') == 0) : ?><?php comments_popup_link( 0, 1, '%', 'comment_two', ''); ?><?php endif ;?> </div> <h2><?php if(is_sticky()) {echo "<i class='fa fa-thumb-tack'></i>";} ?><a href="<?php the_permalink();?>"><?php the_title();?></a></h2> <div class="post-meta"> <?php meta_all( true, false, true ); ?> </div> <?php rehub_format_score('small') ?> <?php if(vp_metabox('rehub_post.rehub_framework_post_type') == 'gallery') : ?> <?php $gallery_images = vp_metabox('rehub_post.gallery_post.0.gallery_post_images'); ?> <?php $gallery_i=0; foreach ($gallery_images as $gallery_img) { $gallery_i++;} ;?> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?> <figure class="slider_post"> <div class="pattern"></div> <div class="caption"><a href="<?php the_permalink();?>">+<?php echo $gallery_i; ?></a><i class="fa fa-camera"></i></div> <?php rehub_formats_icons(); ?> <?php if( rehub_option( 'aq_resize') == 1 ) : ?> <?php $img = get_post_thumb(); ?> <a href="<?php the_permalink();?>"><img src="<?php $params = array( 'width' => 300, 'height' => 200, 'crop' => true ); echo bfi_thumb($img, $params); ?>" alt="<?php the_title(); ?>" /></a> <?php else :?> <a href="<?php the_permalink();?>"><?php the_post_thumbnail('grid_news'); ?></a> <?php endif ;?> </figure> <?php } ?> <?php elseif(vp_metabox('rehub_post.rehub_framework_post_type') == 'music') : ?> <?php if(vp_metabox('rehub_post.music_post.0.music_post_source') == 'music_post_soundcloud') : ?> <div class="music_soundcloud"> <?php echo vp_metabox('rehub_post.music_post.0.music_post_soundcloud_embed'); ?> </div> <?php elseif(vp_metabox('rehub_post.music_post.0.music_post_source') == 'music_post_spotify') : ?> <div class="music_spotify"> <iframe src="https://embed.spotify.com/?uri=<?php echo vp_metabox('rehub_post.music_post.0.music_post_spotify_embed'); ?>" width="100%" height="80" frameborder="0" allowtransparency="true"></iframe> </div> <?php endif; ?> <?php else : ?> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?> <figure> <div class="pattern"></div> <?php rehub_formats_icons('full'); ?> <a href="<?php the_permalink();?>"><?php wpsm_thumb ('grid_news') ?></a> </figure> <?php } ?> <?php endif; ?><?php rehub_create_btn('') ;?> <p><?php kama_excerpt('maxchar=320'); ?></p></article>من اینطوریش کردم ولی بازم جواب نداد<?php if (is_category('فروشگاه')) : ?><article class="small_post<?php if(is_sticky()) {echo " sticky";} ?>" style="background: beige;"> <div class="top"> <div class="cats_def"> <?php $categories = get_the_category(); $separator = ''; $output = ''; if($categories){ foreach($categories as $category) { $cat_id = $category->term_id; $cat_data = get_option("category_$cat_id"); $output .= '<a href="'.get_category_link( $category->term_id ).'" class="cat-'.$cat_id.'"'; if (!empty($cat_data['cat_color'])) { $output .= ' style="color: '.$cat_data["cat_color"].' !important; "'; } $output .='>'.$category->cat_name.'</a>'.$separator; } echo trim($output, $separator); } ?> </div> <?php if (rehub_option('exclude_comments_meta') == 0) : ?><?php comments_popup_link( 0, 1, '%', 'comment_two', ''); ?><?php endif ;?> </div> <h2><?php if(is_sticky()) {echo "<i class='fa fa-thumb-tack'></i>";} ?><a href="<?php the_permalink();?>"><?php the_title();?></a></h2> <div class="post-meta"> <?php meta_all( true, false, true ); ?> </div> <?php rehub_format_score('small') ?> <?php if(vp_metabox('rehub_post.rehub_framework_post_type') == 'gallery') : ?> <?php $gallery_images = vp_metabox('rehub_post.gallery_post.0.gallery_post_images'); ?> <?php $gallery_i=0; foreach ($gallery_images as $gallery_img) { $gallery_i++;} ;?> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?> <figure class="slider_post"> <div class="pattern"></div> <div class="caption"><a href="<?php the_permalink();?>">+<?php echo $gallery_i; ?></a><i class="fa fa-camera"></i></div> <?php rehub_formats_icons(); ?> <?php if( rehub_option( 'aq_resize') == 1 ) : ?> <?php $img = get_post_thumb(); ?> <a href="<?php the_permalink();?>"><img src="<?php $params = array( 'width' => 300, 'height' => 200, 'crop' => true ); echo bfi_thumb($img, $params); ?>" alt="<?php the_title(); ?>" /></a> <?php else :?> <a href="<?php the_permalink();?>"><?php the_post_thumbnail('grid_news'); ?></a> <?php endif ;?> </figure> <?php } ?> <?php elseif(vp_metabox('rehub_post.rehub_framework_post_type') == 'music') : ?> <?php if(vp_metabox('rehub_post.music_post.0.music_post_source') == 'music_post_soundcloud') : ?> <div class="music_soundcloud"> <?php echo vp_metabox('rehub_post.music_post.0.music_post_soundcloud_embed'); ?> </div> <?php elseif(vp_metabox('rehub_post.music_post.0.music_post_source') == 'music_post_spotify') : ?> <div class="music_spotify"> <iframe src="https://embed.spotify.com/?uri=<?php echo vp_metabox('rehub_post.music_post.0.music_post_spotify_embed'); ?>" width="100%" height="80" frameborder="0" allowtransparency="true"></iframe> </div> <?php endif; ?> <?php else : ?> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?> <figure> <div class="pattern"></div> <?php rehub_formats_icons('full'); ?> <a href="<?php the_permalink();?>"><?php wpsm_thumb ('grid_news') ?></a> </figure> <?php } ?> <?php endif; ?><?php rehub_create_btn('') ;?> <p><?php kama_excerpt('maxchar=320'); ?></p></article><?php else : ?><article class="small_post<?php if(is_sticky()) {echo " sticky";} ?>"> <div class="top"> <div class="cats_def"> <?php $categories = get_the_category(); $separator = ''; $output = ''; if($categories){ foreach($categories as $category) { $cat_id = $category->term_id; $cat_data = get_option("category_$cat_id"); $output .= '<a href="'.get_category_link( $category->term_id ).'" class="cat-'.$cat_id.'"'; if (!empty($cat_data['cat_color'])) { $output .= ' style="color: '.$cat_data["cat_color"].' !important; "'; } $output .='>'.$category->cat_name.'</a>'.$separator; } echo trim($output, $separator); } ?> </div> <?php if (rehub_option('exclude_comments_meta') == 0) : ?><?php comments_popup_link( 0, 1, '%', 'comment_two', ''); ?><?php endif ;?> </div> <h2><?php if(is_sticky()) {echo "<i class='fa fa-thumb-tack'></i>";} ?><a href="<?php the_permalink();?>"><?php the_title();?></a></h2> <div class="post-meta"> <?php meta_all( true, false, true ); ?> </div> <?php rehub_format_score('small') ?> <?php if(vp_metabox('rehub_post.rehub_framework_post_type') == 'gallery') : ?> <?php $gallery_images = vp_metabox('rehub_post.gallery_post.0.gallery_post_images'); ?> <?php $gallery_i=0; foreach ($gallery_images as $gallery_img) { $gallery_i++;} ;?> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?> <figure class="slider_post"> <div class="pattern"></div> <div class="caption"><a href="<?php the_permalink();?>">+<?php echo $gallery_i; ?></a><i class="fa fa-camera"></i></div> <?php rehub_formats_icons(); ?> <?php if( rehub_option( 'aq_resize') == 1 ) : ?> <?php $img = get_post_thumb(); ?> <a href="<?php the_permalink();?>"><img src="<?php $params = array( 'width' => 300, 'height' => 200, 'crop' => true ); echo bfi_thumb($img, $params); ?>" alt="<?php the_title(); ?>" /></a> <?php else :?> <a href="<?php the_permalink();?>"><?php the_post_thumbnail('grid_news'); ?></a> <?php endif ;?> </figure> <?php } ?> <?php elseif(vp_metabox('rehub_post.rehub_framework_post_type') == 'music') : ?> <?php if(vp_metabox('rehub_post.music_post.0.music_post_source') == 'music_post_soundcloud') : ?> <div class="music_soundcloud"> <?php echo vp_metabox('rehub_post.music_post.0.music_post_soundcloud_embed'); ?> </div> <?php elseif(vp_metabox('rehub_post.music_post.0.music_post_source') == 'music_post_spotify') : ?> <div class="music_spotify"> <iframe src="https://embed.spotify.com/?uri=<?php echo vp_metabox('rehub_post.music_post.0.music_post_spotify_embed'); ?>" width="100%" height="80" frameborder="0" allowtransparency="true"></iframe> </div> <?php endif; ?> <?php else : ?> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?> <figure> <div class="pattern"></div> <?php rehub_formats_icons('full'); ?> <a href="<?php the_permalink();?>"><?php wpsm_thumb ('grid_news') ?></a> </figure> <?php } ?> <?php endif; ?><?php rehub_create_btn('') ;?> <p><?php kama_excerpt('maxchar=320'); ?></p></article><?php endif; ?> نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .