If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
February 17, 2013 at 12:49 am #20426
I have a gallery page of portfolio items with customised dimensions.
When I have clicked through from there to a ‘single portfolio page’ and then select a category from the meta under the photo, it selects the elements from that category but displays them on a page with what I think is ‘Gallery post type’ formatting. The photos are the wrong size and proportions and they are cropped.
In the functions.php I already have set at the size I had wanted, as you can see below.
$avia_config = array(‘width’=>36, ‘height’=>36 ); // small preview pics eg sidebar news
$avia_config = array(‘width’=>480, ‘height’=>726, ‘crop’=>false); // big images for post format image and gallery posts
$avia_config = array(‘width’=>480, ‘height’=>726, ‘crop’=>false); // big images for lightbox and portfolio single entries
$avia_config = array(‘width’=>930, ‘height’=>340); // images for fullsize pages and fullsize slider
$avia_config = array(‘width’=>480, ‘height’=>726); // images for portfolio entries (2,3,4 column)
$avia_config = array(‘width’=>480, ‘height’=>726, ‘crop’=>false); // custom portoflio item page left image
I am a little confused that portfolio items are being pulled into what I think is a post format. Especially when I seem to have changed the sizes for that anyway !
http://emilyzhukov.com/portfolio_entries/sculpture/ here you can see what I am talking about. The images seem tnumbnails created at 480 x 340. They must then be magnified because they look wider than 480 pixels to me. This page also has a sidebar, which only exists on the blog page.
Ideally I would display the chosen category in a way that doesn’t crop the photos. Another option I’m considering is removing the meta for portfolio categories that appears below the single portfolio page’s photograph.
I’ve been looking through a bunch of files but it’s quite confusing. Are you able to help please.
This is quite possibly a WordPress issue
TimFebruary 17, 2013 at 1:08 am #107587
I have achieved the second option (removing the meta from below the photo) by removing the whole span tag that contained the meta from loop-portfolio-single.php from line 50 onwards as below.
This has done the trick, but I’d be grateful for the info if there was another way.
$portfolio_cats = get_the_term_list( get_the_ID(), ‘portfolio_entries’, ”, ‘, ‘,”);
if($portfolio_cats && !is_object($portfolio_cats))
echo ‘<span class=”portfolio-categories minor-meta”>’.__(‘in ‘,’avia_framework’);
echo ‘ </span><span class=”text-sep”>/</span> ‘;
echo ‘<span class=”blog-author minor-meta”>’.__(‘by ‘,’avia_framework’);
</span>February 18, 2013 at 2:59 pm #107588
All post types in wordpress are capable of being shown as an archive. IE, take a tag or category and even a data range with posts and they will be spit out as an archive. The archive display is by default shown as a list and typically styled similar to a blog layout.
So if you wanted to have the category archive for portfolio items look different than how they are, you would need to create a new file for wordpress to pull from. I believe the correct hierarchy would be taxonomy-portfolio.php since portfolio is the custom post type.
You can copy over the archive.php to this new file, then change the loop used to a new one you would also need to create. Although, you could try just having the archive run the loop-portoflio. That may work though I’ve not actually tried it (ie changing your new taxonomy-portfolio.php file to use get_template_part(‘includes/loop’, ‘portfolio’); ).
The topic ‘Gallery post type comes up when selecting categories from single portfoliio page’ is closed to new replies.