arta.mo
تازه وارد
سلام
چند وقتی میشه قالبی تحت عن.وان ultmate خریداری کردهام . قالب ذکر شده یک بخش مجزا برای نمونه کارها داره و در یک صفحه ی مجزا و به خوبی نمونه کار ها رو نشون میده کاری که میخوام بکنم و البته نیاز به کمک اساتید برنامه نویس دارم اینه که یک بخش به نام محصولات هم به قالب اضافه کنم که به مانند نمونه کارها مجزا باشه . اگه بخوام بیشتر توضیح بدم میخوام استایل های بخش نمونه کار ها رو کپی کنم و بخشی تحت عنوان محصولات به قالب اضافه کنم .
این هم کد هایی که توی قالب در زمینه با بخش نمونه کارها وجود داره
فایل single-portfolio.php
<?php get_header();?> <!-- **Content** --> <div class="content content-full-width"> <?php if( have_posts() ): ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'framework/loops/content', 'single-portfolio' ); ?> <?php endwhile; endif;?> <!-- Releated Gallery Section --> <?php $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("show-releated-items",$portfolio_settings)): $category_ids = array(); $input = wp_get_object_terms( $post->ID, 'portfolio_entries'); foreach($input as $category) $category_ids[] = $category->term_id; $args = array('orderby' => 'rand','showposts' => 3 ,'post__not_in' => array($post->ID), 'tax_query' => array( array( 'taxonomy'=>'portfolio_entries', 'field'=>'id', 'operator'=>'IN', 'terms'=>$category_ids ))); query_posts($args); if( have_posts() ):?> <h2><?php _e('Related Projects','ultimate');?></h2> <!-- **Portfolio** --> <div class="portfolio column-one-third"> <?php $count = 1; while(have_posts()): the_post(); $the_id = get_the_ID(); $title = $title = ( strlen(get_the_title()) > 28 ) ? substr(get_the_title(),0,26)."..." :get_the_title() ; $permalink = get_permalink(); $class = ($count%3== 0) ? ' last': '';?> <div class="column one-third <?php echo $class;?>"> <div class="thumb"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) ); ?>"> <?php if(has_post_thumbnail()): the_post_thumbnail('portfolio-three-column'); else: ?> <img src="<?php echo IAMD_BASE_URL."images/dummy-images/portfolio-three-column.jpg";?>" alt="" /> <?php endif; ?> </a> <div class="image-overlay"> <?php $full = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("video_url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings['video_url'];?>" target="_blank" data-gal="prettyPhoto[gallery]" class="image-overlay-video"></a> <?php elseif($full): ?> <a href="<?php echo $full[0];?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"></a> <?php else: ?> <a href="<?php echo IAMD_BASE_URL."images/dummy-images/portfolio-three-column.jpg";?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"></a> <?php endif;?> <?php if(array_key_exists("url",$portfolio_settings)): ?> <a href="<?php echo $portfolio_settings["url"];?>" target="_blank" class="image-overlay-link"> </a> <?php else: ?> <a href="<?php the_permalink();?>" title="<?php printf( esc_attr__('%s'), the_title_attribute('echo=0'));?>" class="image-overlay-link"> </a> <?php endif;?> </div><!-- .image-overlay end --> </div><!-- .thumb --> <h4><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></h4> <div class="buttons"> <a href="<?php echo $permalink; ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) );?>" class="button small light-grey"><span><?php _e('View Project','ultimate');?></span></a> <?php $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings["url"];?>" title="" class="button small light-grey" target="_blank"> <span><?php _e('Go to site','ultimate');?></span></a> <?php endif;?> </div><!-- .buttons end --> </div><!-- .column end--> <?php $count++; endwhile; ?> </div><!-- .column-one-third **Portfolio - End** --> <?php endif;?> <?php endif;?> <!-- Releated Gallery Section End --> </div><!-- **Portfolio Single - End** --> <!-- Open div is in content-single-portfolio.php --> </div> <!-- **Content - End** --><?php get_footer();?>و فایل tpl-portfolio.php
<?php /*Template Name: Portfolio Template*/?><?php get_header();?><?php $tpl_portfolio_settings = get_post_meta($post->ID,'_tpl_portfolio_settings',TRUE); $tpl_portfolio_settings = is_array($tpl_portfolio_settings) ? $tpl_portfolio_settings : array(); $sortable = isset($tpl_portfolio_settings['filter'])?'sortable':NULL; $page_layout = ""; $post_layout = ""; $post_class = ""; $image_type = ""; $show_sidebar = false; $sidebar_class=""; $categories = ""; $categories = isset($tpl_portfolio_settings['cats']) ? array_filter($tpl_portfolio_settings['cats']) : $categories; if(empty($categories)): $categories = get_categories('taxonomy=portfolio_entries&hide_empty=1'); else: $args = array('taxonomy'=>'portfolio_entries','hide_empty'=>1,'include'=>$categories); $categories = get_categories($args); endif; switch($tpl_portfolio_settings['page-layout']): case 'content-full-width': $page_layout = "content-full-width"; break; case 'with-left-sidebar': $page_layout = "with-left-sidebar"; $show_sidebar = true; $sidebar_class = "left-sidebar"; break; case 'with-right-sidebar': $show_sidebar = true; break; default: $page_layout = "content-full-width"; break; endswitch; switch($tpl_portfolio_settings['post-layout']): case 'one-column': $post_layout = $show_sidebar ? "one-column-with-sidebar" : "one-column"; $post_class = "column"; $image_type = $show_sidebar ? "portfolio-one-column-with-sidebar" : "portfolio-one-column"; break; case 'one-half-column': $post_layout = $show_sidebar ? "column-one-half-with-sidebar" : "column-one-half"; $post_class = "one-half"; $image_type = $show_sidebar ? "portfolio-two-column-with-sidebar" : "portfolio-two-column"; break; case 'one-third-column': $post_layout = $show_sidebar ? "column-one-third-with-sidebar" : "column-one-third"; $post_class = "one-third"; $image_type = $show_sidebar ? "portfolio-three-column-with-sidebar" : "portfolio-three-column"; break; endswitch;?> <!-- **Content** --> <div class="content <?php echo $page_layout;?>"> <?php if($show_sidebar):?> <div class="inner-with-sidebar"></div> <?php endif;?> <?php if( have_posts() ): ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'framework/loops/content', 'portfolio-page' ); ?> <?php endwhile; endif; ?> <!--- Portfolio item content --> <div class="portfolio <?php echo $post_layout;?>"> <?php if( array_key_exists("filter",$tpl_portfolio_settings) && (!empty($categories)) ): ?> <div id="sorting-container"> <a href="#" class="active_sort" title="" data-filter=".all-sort"><?php _e('All','ultimate');?></a> <?php foreach( $categories as $category ): ?> <a href='#' data-filter=".<?php echo $category->category_nicename;?>-sort"><?php echo $category->cat_name;?></a> <?php endforeach; ?> </div> <?php endif; ?> <!-- **Portfolio Container** --> <div class="portfolio-container gallery"> <?php $args = array(); $categories = array_filter($tpl_portfolio_settings['cats']); if(is_array($categories) && !empty($categories)): $terms = $categories; $args = array( 'orderby' => 'ID' ,'order' => 'ASC' ,'paged' => get_query_var( 'paged' ) ,'posts_per_page' => $tpl_portfolio_settings['post-per-page'] ,'tax_query' => array( array( 'taxonomy'=>'portfolio_entries', 'field'=>'id', 'operator'=>'IN', 'terms'=>$terms ) ) ); else: $args = array( 'paged' => get_query_var( 'paged' ) ,'posts_per_page' => $tpl_portfolio_settings['post-per-page'] ,'post_type' => 'portfolio'); endif; query_posts($args); if( have_posts() ): while( have_posts() ): the_post(); $the_id = get_the_ID(); #Find sort class by using the portfolio_entries $sort = ""; $item_categories = get_the_terms( $the_id, 'portfolio_entries' ); if(is_object($item_categories) || is_array($item_categories)): foreach ($item_categories as $category): $sort .= $category->slug.'-sort '; endforeach; endif;?> <div class="post-entry <?php echo $post_class;?> column all-sort <?php echo $sort;?>"> <div class="thumb"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) ); ?>"> <?php if(has_post_thumbnail()): the_post_thumbnail($image_type); else: ?> <img src="<?php echo IAMD_BASE_URL."images/dummy-images/{$image_type}.jpg";?>" alt="" /> <?php endif; ?> </a> <div class="image-overlay"> <?php $full = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("video_url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings['video_url'];?>" target="_blank" data-gal="prettyPhoto[gallery]" class="image-overlay-video"> </a> <?php elseif($full): ?> <a href="<?php echo $full[0];?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"> </a> <?php else: ?> <a href="<?php echo IAMD_BASE_URL."images/dummy-images/{$image_type}.jpg";?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"> </a> <?php endif;?> <?php if(array_key_exists("url",$portfolio_settings)): ?> <a href="<?php echo $portfolio_settings["url"];?>" target="_blank" class="image-overlay-link"> </a> <?php else: ?> <a href="<?php the_permalink();?>" title="<?php printf( esc_attr__('%s'), the_title_attribute('echo=0'));?>" class="image-overlay-link"> </a> <?php endif;?> </div> </div> <h4><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></h4> <?php if( array_key_exists("excerpt",$tpl_portfolio_settings)):?> <div class="portfolio-desc"><?php echo mytheme_excerpt($tpl_portfolio_settings['excerpt-length']);?></div> <?php endif;?> <div class="buttons"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) ); ?>" class="button small light-grey"> <span><?php _e('View Project','ultimate');?></span></a> <?php $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings["url"];?>" title="" class="button small light-grey" target="_blank"> <span><?php _e('Go to site','ultimate');?></span></a> <?php endif;?> </div> </div> <?php endwhile; endif;?> </div><!-- **Portfolio Container - End** --> <!-- **Pagination** --> <div class="pagination"> <?php previous_posts_link('<span class="prev-post"></span>');?> <?php echo my_pagination();?> <?php next_posts_link('<span class="next-post"></span>');?> </div><!-- **Pagination - End** --> </div><!--- Portfolio item content end--> </div> <!-- **Content - End** --> <?php if($show_sidebar): ?> <!-- **Sidebar** --> <div class="sidebar <?php echo $sidebar_class;?>"> <div class="inner-sidebar"> </div> <?php get_sidebar();?> </div><!-- **Sidebar - End** --> <?php endif; ?> <?php get_footer();?>البته من این دوتا رو کپی کردم و یه سری توابعش رو هم تغییر دادم تا دو تا بخش نمونه کار توی بخش مدیریت وردپرس ظاهر بشه و توی یک بخشش محصولات رو بزارم ولی موفق نشدم
اساتید کمک کنید لطفا
چند وقتی میشه قالبی تحت عن.وان ultmate خریداری کردهام . قالب ذکر شده یک بخش مجزا برای نمونه کارها داره و در یک صفحه ی مجزا و به خوبی نمونه کار ها رو نشون میده کاری که میخوام بکنم و البته نیاز به کمک اساتید برنامه نویس دارم اینه که یک بخش به نام محصولات هم به قالب اضافه کنم که به مانند نمونه کارها مجزا باشه . اگه بخوام بیشتر توضیح بدم میخوام استایل های بخش نمونه کار ها رو کپی کنم و بخشی تحت عنوان محصولات به قالب اضافه کنم .
این هم کد هایی که توی قالب در زمینه با بخش نمونه کارها وجود داره
فایل single-portfolio.php
<?php get_header();?> <!-- **Content** --> <div class="content content-full-width"> <?php if( have_posts() ): ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'framework/loops/content', 'single-portfolio' ); ?> <?php endwhile; endif;?> <!-- Releated Gallery Section --> <?php $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("show-releated-items",$portfolio_settings)): $category_ids = array(); $input = wp_get_object_terms( $post->ID, 'portfolio_entries'); foreach($input as $category) $category_ids[] = $category->term_id; $args = array('orderby' => 'rand','showposts' => 3 ,'post__not_in' => array($post->ID), 'tax_query' => array( array( 'taxonomy'=>'portfolio_entries', 'field'=>'id', 'operator'=>'IN', 'terms'=>$category_ids ))); query_posts($args); if( have_posts() ):?> <h2><?php _e('Related Projects','ultimate');?></h2> <!-- **Portfolio** --> <div class="portfolio column-one-third"> <?php $count = 1; while(have_posts()): the_post(); $the_id = get_the_ID(); $title = $title = ( strlen(get_the_title()) > 28 ) ? substr(get_the_title(),0,26)."..." :get_the_title() ; $permalink = get_permalink(); $class = ($count%3== 0) ? ' last': '';?> <div class="column one-third <?php echo $class;?>"> <div class="thumb"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) ); ?>"> <?php if(has_post_thumbnail()): the_post_thumbnail('portfolio-three-column'); else: ?> <img src="<?php echo IAMD_BASE_URL."images/dummy-images/portfolio-three-column.jpg";?>" alt="" /> <?php endif; ?> </a> <div class="image-overlay"> <?php $full = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("video_url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings['video_url'];?>" target="_blank" data-gal="prettyPhoto[gallery]" class="image-overlay-video"></a> <?php elseif($full): ?> <a href="<?php echo $full[0];?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"></a> <?php else: ?> <a href="<?php echo IAMD_BASE_URL."images/dummy-images/portfolio-three-column.jpg";?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"></a> <?php endif;?> <?php if(array_key_exists("url",$portfolio_settings)): ?> <a href="<?php echo $portfolio_settings["url"];?>" target="_blank" class="image-overlay-link"> </a> <?php else: ?> <a href="<?php the_permalink();?>" title="<?php printf( esc_attr__('%s'), the_title_attribute('echo=0'));?>" class="image-overlay-link"> </a> <?php endif;?> </div><!-- .image-overlay end --> </div><!-- .thumb --> <h4><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></h4> <div class="buttons"> <a href="<?php echo $permalink; ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) );?>" class="button small light-grey"><span><?php _e('View Project','ultimate');?></span></a> <?php $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings["url"];?>" title="" class="button small light-grey" target="_blank"> <span><?php _e('Go to site','ultimate');?></span></a> <?php endif;?> </div><!-- .buttons end --> </div><!-- .column end--> <?php $count++; endwhile; ?> </div><!-- .column-one-third **Portfolio - End** --> <?php endif;?> <?php endif;?> <!-- Releated Gallery Section End --> </div><!-- **Portfolio Single - End** --> <!-- Open div is in content-single-portfolio.php --> </div> <!-- **Content - End** --><?php get_footer();?>و فایل tpl-portfolio.php
<?php /*Template Name: Portfolio Template*/?><?php get_header();?><?php $tpl_portfolio_settings = get_post_meta($post->ID,'_tpl_portfolio_settings',TRUE); $tpl_portfolio_settings = is_array($tpl_portfolio_settings) ? $tpl_portfolio_settings : array(); $sortable = isset($tpl_portfolio_settings['filter'])?'sortable':NULL; $page_layout = ""; $post_layout = ""; $post_class = ""; $image_type = ""; $show_sidebar = false; $sidebar_class=""; $categories = ""; $categories = isset($tpl_portfolio_settings['cats']) ? array_filter($tpl_portfolio_settings['cats']) : $categories; if(empty($categories)): $categories = get_categories('taxonomy=portfolio_entries&hide_empty=1'); else: $args = array('taxonomy'=>'portfolio_entries','hide_empty'=>1,'include'=>$categories); $categories = get_categories($args); endif; switch($tpl_portfolio_settings['page-layout']): case 'content-full-width': $page_layout = "content-full-width"; break; case 'with-left-sidebar': $page_layout = "with-left-sidebar"; $show_sidebar = true; $sidebar_class = "left-sidebar"; break; case 'with-right-sidebar': $show_sidebar = true; break; default: $page_layout = "content-full-width"; break; endswitch; switch($tpl_portfolio_settings['post-layout']): case 'one-column': $post_layout = $show_sidebar ? "one-column-with-sidebar" : "one-column"; $post_class = "column"; $image_type = $show_sidebar ? "portfolio-one-column-with-sidebar" : "portfolio-one-column"; break; case 'one-half-column': $post_layout = $show_sidebar ? "column-one-half-with-sidebar" : "column-one-half"; $post_class = "one-half"; $image_type = $show_sidebar ? "portfolio-two-column-with-sidebar" : "portfolio-two-column"; break; case 'one-third-column': $post_layout = $show_sidebar ? "column-one-third-with-sidebar" : "column-one-third"; $post_class = "one-third"; $image_type = $show_sidebar ? "portfolio-three-column-with-sidebar" : "portfolio-three-column"; break; endswitch;?> <!-- **Content** --> <div class="content <?php echo $page_layout;?>"> <?php if($show_sidebar):?> <div class="inner-with-sidebar"></div> <?php endif;?> <?php if( have_posts() ): ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'framework/loops/content', 'portfolio-page' ); ?> <?php endwhile; endif; ?> <!--- Portfolio item content --> <div class="portfolio <?php echo $post_layout;?>"> <?php if( array_key_exists("filter",$tpl_portfolio_settings) && (!empty($categories)) ): ?> <div id="sorting-container"> <a href="#" class="active_sort" title="" data-filter=".all-sort"><?php _e('All','ultimate');?></a> <?php foreach( $categories as $category ): ?> <a href='#' data-filter=".<?php echo $category->category_nicename;?>-sort"><?php echo $category->cat_name;?></a> <?php endforeach; ?> </div> <?php endif; ?> <!-- **Portfolio Container** --> <div class="portfolio-container gallery"> <?php $args = array(); $categories = array_filter($tpl_portfolio_settings['cats']); if(is_array($categories) && !empty($categories)): $terms = $categories; $args = array( 'orderby' => 'ID' ,'order' => 'ASC' ,'paged' => get_query_var( 'paged' ) ,'posts_per_page' => $tpl_portfolio_settings['post-per-page'] ,'tax_query' => array( array( 'taxonomy'=>'portfolio_entries', 'field'=>'id', 'operator'=>'IN', 'terms'=>$terms ) ) ); else: $args = array( 'paged' => get_query_var( 'paged' ) ,'posts_per_page' => $tpl_portfolio_settings['post-per-page'] ,'post_type' => 'portfolio'); endif; query_posts($args); if( have_posts() ): while( have_posts() ): the_post(); $the_id = get_the_ID(); #Find sort class by using the portfolio_entries $sort = ""; $item_categories = get_the_terms( $the_id, 'portfolio_entries' ); if(is_object($item_categories) || is_array($item_categories)): foreach ($item_categories as $category): $sort .= $category->slug.'-sort '; endforeach; endif;?> <div class="post-entry <?php echo $post_class;?> column all-sort <?php echo $sort;?>"> <div class="thumb"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) ); ?>"> <?php if(has_post_thumbnail()): the_post_thumbnail($image_type); else: ?> <img src="<?php echo IAMD_BASE_URL."images/dummy-images/{$image_type}.jpg";?>" alt="" /> <?php endif; ?> </a> <div class="image-overlay"> <?php $full = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("video_url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings['video_url'];?>" target="_blank" data-gal="prettyPhoto[gallery]" class="image-overlay-video"> </a> <?php elseif($full): ?> <a href="<?php echo $full[0];?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"> </a> <?php else: ?> <a href="<?php echo IAMD_BASE_URL."images/dummy-images/{$image_type}.jpg";?>" data-gal="prettyPhoto[gallery]" class="image-overlay-zoom"> </a> <?php endif;?> <?php if(array_key_exists("url",$portfolio_settings)): ?> <a href="<?php echo $portfolio_settings["url"];?>" target="_blank" class="image-overlay-link"> </a> <?php else: ?> <a href="<?php the_permalink();?>" title="<?php printf( esc_attr__('%s'), the_title_attribute('echo=0'));?>" class="image-overlay-link"> </a> <?php endif;?> </div> </div> <h4><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></h4> <?php if( array_key_exists("excerpt",$tpl_portfolio_settings)):?> <div class="portfolio-desc"><?php echo mytheme_excerpt($tpl_portfolio_settings['excerpt-length']);?></div> <?php endif;?> <div class="buttons"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s'), the_title_attribute( 'echo=0' ) ); ?>" class="button small light-grey"> <span><?php _e('View Project','ultimate');?></span></a> <?php $portfolio_settings = get_post_meta($post->ID,'_portfolio_settings',TRUE); $portfolio_settings = is_array($portfolio_settings) ? $portfolio_settings : array(); if(array_key_exists("url",$portfolio_settings)):?> <a href="<?php echo $portfolio_settings["url"];?>" title="" class="button small light-grey" target="_blank"> <span><?php _e('Go to site','ultimate');?></span></a> <?php endif;?> </div> </div> <?php endwhile; endif;?> </div><!-- **Portfolio Container - End** --> <!-- **Pagination** --> <div class="pagination"> <?php previous_posts_link('<span class="prev-post"></span>');?> <?php echo my_pagination();?> <?php next_posts_link('<span class="next-post"></span>');?> </div><!-- **Pagination - End** --> </div><!--- Portfolio item content end--> </div> <!-- **Content - End** --> <?php if($show_sidebar): ?> <!-- **Sidebar** --> <div class="sidebar <?php echo $sidebar_class;?>"> <div class="inner-sidebar"> </div> <?php get_sidebar();?> </div><!-- **Sidebar - End** --> <?php endif; ?> <?php get_footer();?>البته من این دوتا رو کپی کردم و یه سری توابعش رو هم تغییر دادم تا دو تا بخش نمونه کار توی بخش مدیریت وردپرس ظاهر بشه و توی یک بخشش محصولات رو بزارم ولی موفق نشدم
اساتید کمک کنید لطفا