Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Theme Goodidea adjustment in portfolio gallery WordPress

  • SOLVED

Hi,

I'm using the wordpress theme Goodidea for a portfolio.
But i would like to have at the homepage 12 images (4 columns / 3 rows).
here i want to show a few of the portfoliocategories.
But if i do this, and i want to see a portfolio categorie in total, it doesn't work.
this is the site www.studiowootwoot.com/filenbaukis2

Can any one help me?
thank you
greetings
Karina


This is the php file

<?php
/**
* Template Name: Portfolio - 4 columns
*/
get_header();?>
<?php include (TEMPLATEPATH.'/get-option.php');?>
<div id="page">
<div id="container">
<div class="portfolio-wrapper">
<?php //Show the content?>
<div class="portfolio-content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post();?>
<?php the_content();?>
<?php endwhile?>
<?php endif?>
</div>
<?php include('include/portfolio/portfolio-header.php');?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post();?>
<?php include('include/portfolio/portfolio-check-case.php');?>
<?php
$getcat = get_the_terms ($post->ID, 'port-cat');
?>

<div class="<?php foreach( $getcat as $category ) { echo str_replace (" ", "",$category->name). '-forfilter '; } ?>All port-4-wrapper mb20 mt0 portfolio-item">
<div class="h240 frame relative">
<div class="hover-port relative h240 <?php echo $zoom;?>">
<div class="<?php if($th_lightbox || $th_post): echo "portfolio-hover"; endif?>">
<div class="portfolio-hover-inner">

<?php if($th_lightbox):?>
<div class="portfolio-zoom top204 right20">
<?php if($zoom_sp):?>
<a href="<?php echo get_post_meta($post->ID, "specified-image", true);?>" rel="prettyPhoto[pp_gal]" title="<?php the_title();?>"><img src="<?php bloginfo('template_directory'); ?>/img/zoom.png" alt=""/></a>
<?php elseif($zoom_video):?>
<a href="<?php echo get_post_meta($post->ID, "url-video", true);?>" rel="prettyPhoto[pp_gal]" title="<?php the_title();?>"><img src="<?php bloginfo('template_directory'); ?>/img/zoom-video.png" alt=""/></a>
<?php else:?>
<a href="<?php echo $image_url[0];?>" rel="prettyPhoto[pp_gal]" title="<?php the_title();?>"><img src="<?php bloginfo('template_directory'); ?>/img/zoom.png" alt=""/></a>
<?php endif;?>
</div>
<?php endif ?>
<?php if($th_post):?>
<div class="portfolio-h-link top20 left20">
<a href="<?php if($spec_link == ""):the_permalink(); else: echo $spec_link; endif?>"><img src="<?php bloginfo('template_directory'); ?>/img/link.png" alt=""/></a>
</div>
<?php endif;?>

<?php
//check if show excerpt
if($show_excerpt == "Yes"):?>
<div class="last-port-item-excerpt">
<?php echo substr(get_the_excerpt(),0,140)." ...";?>
</div>
<?php endif?>

</div>
</div>
<div>
<?php //Check wheter thumbnail exists ?>
<?php if($image_id == null):?>
<img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php bloginfo('template_directory'); ?>/img/default.jpg&amp;h=240&amp;w=225&amp;zc=1" alt="<?php the_title(); ?>"/>
<?php else: ?>
<img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $image_url[0];?>&amp;h=240&amp;w=225&zc=1" alt="<?php the_title(); ?>"/>
<?php endif ?>
</div>
</div>
</div>
<?php
//check if show excerpt
if($show_title == "Yes"):?>
<div class="last-port-item-link">
<h4 class="cufon">
<a href="<?php if($spec_link == ""):the_permalink(); else: echo $spec_link; endif?>"><?php the_title();?>
</a><span class="last-port-item-link-slash">/</span>
</h4>
</div>
<?php endif?>
</div>
<?php endwhile?>
<?php endif ?>
</ul>
<!-- Social Share -->
<?php if($post_share == "Yes"): ?>
<?php //include('include/social-share/social-share.php');?>
<?php endif?>

<?php if (function_exists("pagination")) {?>
<div class="space h25"></div>
<div class="port-4-pagination">
<?php
global $additional_loop; pagination($additional_loop->max_num_pages); ?>
</div>
<?php } ?>
<div class="space"></div>

<?php //close portfolio-wrapper?>
</div>
<?php //close id=container?>
</div>
<?php //close id=page?>
</div>
<?php get_footer();?>

Answers (3)

2011-11-04

Luis Abarca answers:

Try this way and let me know if it works.


<?php
/**
* Template Name: Portfolio - 4 columns
*/
get_header();?>
<?php include (TEMPLATEPATH.'/get-option.php');?>
<div id="page">
<div id="container">
<div class="portfolio-wrapper">
<?php //Show the content?>
<div class="portfolio-content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post();?>
<?php the_content();?>
<?php endwhile?>
<?php endif?>
</div>
<?php include('include/portfolio/portfolio-header.php');?>
<strong><?php query_posts('posts_per_page=12') ?></strong>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post();?>
<?php include('include/portfolio/portfolio-check-case.php');?>
<?php
$getcat = get_the_terms ($post->ID, 'port-cat');
?>

<div class="<?php foreach( $getcat as $category ) { echo str_replace (" ", "",$category->name). '-forfilter '; } ?>All port-4-wrapper mb20 mt0 portfolio-item">
<div class="h240 frame relative">
<div class="hover-port relative h240 <?php echo $zoom;?>">
<div class="<?php if($th_lightbox || $th_post): echo "portfolio-hover"; endif?>">
<div class="portfolio-hover-inner">

<?php if($th_lightbox):?>
<div class="portfolio-zoom top204 right20">
<?php if($zoom_sp):?>
<a href="<?php echo get_post_meta($post->ID, "specified-image", true);?>" rel="prettyPhoto[pp_gal]" title="<?php the_title();?>"><img src="<?php bloginfo('template_directory'); ?>/img/zoom.png" alt=""/></a>
<?php elseif($zoom_video):?>
<a href="<?php echo get_post_meta($post->ID, "url-video", true);?>" rel="prettyPhoto[pp_gal]" title="<?php the_title();?>"><img src="<?php bloginfo('template_directory'); ?>/img/zoom-video.png" alt=""/></a>
<?php else:?>
<a href="<?php echo $image_url[0];?>" rel="prettyPhoto[pp_gal]" title="<?php the_title();?>"><img src="<?php bloginfo('template_directory'); ?>/img/zoom.png" alt=""/></a>
<?php endif;?>
</div>
<?php endif ?>
<?php if($th_post):?>
<div class="portfolio-h-link top20 left20">
<a href="<?php if($spec_link == ""):the_permalink(); else: echo $spec_link; endif?>"><img src="<?php bloginfo('template_directory'); ?>/img/link.png" alt=""/></a>
</div>
<?php endif;?>

<?php
//check if show excerpt
if($show_excerpt == "Yes"):?>
<div class="last-port-item-excerpt">
<?php echo substr(get_the_excerpt(),0,140)." ...";?>
</div>
<?php endif?>

</div>
</div>
<div>
<?php //Check wheter thumbnail exists ?>
<?php if($image_id == null):?>
<img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php bloginfo('template_directory'); ?>/img/default.jpg&amp;h=240&amp;w=225&amp;zc=1" alt="<?php the_title(); ?>"/>
<?php else: ?>
<img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $image_url[0];?>&amp;h=240&amp;w=225&zc=1" alt="<?php the_title(); ?>"/>
<?php endif ?>
</div>
</div>
</div>
<?php
//check if show excerpt
if($show_title == "Yes"):?>
<div class="last-port-item-link">
<h4 class="cufon">
<a href="<?php if($spec_link == ""):the_permalink(); else: echo $spec_link; endif?>"><?php the_title();?>
</a><span class="last-port-item-link-slash">/</span>
</h4>
</div>
<?php endif?>
</div>
<?php endwhile?>
<?php endif ?>
</ul>
<!-- Social Share -->
<?php if($post_share == "Yes"): ?>
<?php //include('include/social-share/social-share.php');?>
<?php endif?>

<?php if (function_exists("pagination")) {?>
<div class="space h25"></div>
<div class="port-4-pagination">
<?php
global $additional_loop; pagination($additional_loop->max_num_pages); ?>
</div>
<?php } ?>
<div class="space"></div>

<?php //close portfolio-wrapper?>
</div>
<?php //close id=container?>
</div>
<?php //close id=page?>
</div>
<?php get_footer();?>


Karina Soors comments:

Hi,
Thanks, but this doesn't change anything. i still get an empty page on the portfollio categories..

greetings
Karina

2011-11-04

Clifford P answers:

I didn't look at his code, but make sure you clear your cache and/or use a different browser after making changes. And if you have a caching plugin (like W3), deactivate. Then, once done, reactivate if you choose to.


Karina Soors comments:

Hi,

i've tried this, but i think the problem is that if it shows only 12 images on the homepage. it only chooses between these pictures on the other pages.
And it has to look in the entire "portfolio posts"

greetings
Karina

2011-11-06

Luis Cordova answers:

Karina, i think try modifying the category template rather too since this is where all is happening and not the portfolio template alone