Hi I’m working with a new theme Layover by TheGoTeam and having trouble getting support for this change.
In the main portfolio page there is a sortable “by skills” top list before displaying portfolio items. By default, this theme is calling all skills, including children and because this particular site I am working on has so many children, it is making the top list very messy.
I want only PARENT skill to display in this list. Here’s the code in the portfolio page calling for these skills & associated portfolio posts:
[php]
<div class="grid_12">
<ul class="skills">
<?php terms(get_query_var('skills')); ?>
</ul>
</div>
</div>
<ul id="portfolio_list">
<?php $page = get_query_var('paged'); $args = array('post_type' => 'portfolio','skills'=>get_query_var('skills'),'paged'=> $page, 'posts_per_page'=> get_option('posts_per_page'), 'caller_get_posts' => 1 ); query_posts($args);?>
<?php if (have_posts()):?>
<?php while (have_posts()): the_post() ?>
<?php
$custom = get_post_custom($post->ID);
$skills = get_the_terms( $post->ID, 'skills');
foreach( $skills as $term ) {
$skills_as_text .= $term->slug;
$skills_as_text .= ' ';
}
$year_completed = get_post_meta($post->ID, "year_completed", true);
$website_url = get_post_meta($post->ID, "website_url", true);
$themeteam_video_embed = get_post_meta($post->ID, "themeteam_video_embed", true);
$full = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' , false );
?>
<li class="<?php echo $skills_as_text; ?>">
<?php $skills_as_text = ''; ?>
<div class="grid_3" style="padding-bottom:20px;">
<?php if($themeteam_video_embed) { ?>
<div class="clearfix">
<div class="thumbnail">
<a href="<?php echo $themeteam_video_embed; ?>" rel="prettyPhoto">
<?php the_post_thumbnail('thumb220'); ?>
<span class="frame"><span><span><span><span><span class="empty"><em class="play"> </em></span></span></span></span></span></span>
</a>
</div>
</div>
<?php }else if(has_post_thumbnail()){ ?>
<div class="clearfix">
<div class="thumbnail">
<a href="<?php echo esc_attr($full[0]); ?>" rel="prettyPhoto">
<?php the_post_thumbnail('thumb220'); ?>
<span class="frame"><span><span><span><span><span class="empty"><em class="zoom"> </em></span></span></span></span></span></span>
</a>
</div>
</div>
<?php } ?>
<h2><a href="<?php the_permalink();?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title();?></a></h2>
<article class="article">
</div>[/php]
pls help and thank you!