-
AuthorPosts
-
December 13, 2017 at 7:01 pm #888503
Hello!
I have added a custom image size (rb-square in functions file), and use that size on an advanced builder created page:
https://richard-bauer.psstudiosdev.com/work/Now, we want the same layout for the dynamically generated archive pages: (tag, and portfolio categories)
https://richard-bauer.psstudiosdev.com/portfolio_entries/higher-education/
this uses the customized template in child theme: taxonomy-portfolio_entries.php
AND
https://richard-bauer.psstudiosdev.com/tag/faculty-offices/
this uses the customized template in child theme: tag.phpThose templates use a different image size when they are rendered. I’ve attempted to change the size that they display through many techniques in this forum – this one in particular looked promising, but had no effect: https://kriesi.at/support/topic/edit-the-archive-page-template/
I want the templates to use the Featured Image as set in the portfolio post, but use a square format.
How can I change the image size that these templates display?December 14, 2017 at 2:32 pm #888889Hey psstudiosinc,
What code have you used?
Here are some threads to consider:
https://kriesi.at/support/topic/enfold-image-sizes/
https://kriesi.at/support/topic/ajax-portfolio-change-image-size/Best regards,
VictoriaDecember 15, 2017 at 8:59 pm #889419Hi,
I don’t remember all the code I’ve tried, but rest assured I’ve tried everything that I found on this support forum – including the two links you suggest, without success. Let me restate my question more simply:How can I change the image size that the templates “taxonomy-portfolio_entries.php” and “tag.php” display?
I’d like to change it from rectangular to square. See my original post for more detail. Thanks in advance!
December 16, 2017 at 8:05 pm #889654Hi psstudiosinc,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaDecember 18, 2017 at 6:58 pm #890186Here you go:
December 21, 2017 at 7:10 pm #891281Hi psstudiosinc,
You should be running at least php 5.6.3 for the code to work properly.
Best regards,
VictoriaDecember 22, 2017 at 7:44 pm #891690Thanks for checking. I’ve updated to PHP 7.0.26 with the same failed result. I’m having trouble replacing the image size in the grid on these templates: taxonomy-portfolio_entries.php and tag.php in the child theme.
The code in question is the line image_size below.
$grid = new avia_post_grid(array( 'linking' => '', 'columns' => '3', 'contents' => 'title', 'sort' => 'no', 'paginate' => 'yes', 'image_size' => 'square', // DOESN'T WORK - set new image size: https://kriesi.at/support/topic/edit-the-archive-page-template/ 'set_breadcrumb' => false, ));
Is image_size the correct parameter? The support topic listed above is from 2013. Please take a look and advise. Thank you!
January 3, 2018 at 2:57 am #892689Hi,
Thank you for the info.
You have to set the “preview_mode” parameter to custom before settng the “image_size”.
$grid = new avia_post_grid(array( 'linking' => '', 'columns' => '3', 'contents' => 'title', 'sort' => 'no', 'paginate' => 'yes', 'preview_mode', => 'custom', 'image_size' => 'square', 'set_breadcrumb' => false, ));
Best regards,
IsmaelJanuary 4, 2018 at 12:49 am #893004Other than the errant comma after ‘preview_mode’, – that did it.
working code:
$grid = new avia_post_grid(array( 'linking' => '', 'columns' => '3', 'contents' => 'title', 'sort' => 'no', 'paginate' => 'yes', 'preview_mode' => 'custom', 'image_size' => 'square', 'set_breadcrumb' => false, ));
Thank you so much!
- This reply was modified 6 years, 11 months ago by psstudiosinc.
January 4, 2018 at 7:23 am #893134 -
AuthorPosts
- The topic ‘Change image displayed on taxonomy-portfolio_entries.php and tag.php templates’ is closed to new replies.