Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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.php

    Those 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?

    #888889

    Hey 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,
    Victoria

    #889419

    Hi,
    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!

    #889654

    Hi 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,
    Victoria

    #890186

    Here you go:

    #891281

    Hi psstudiosinc,

    You should be running at least php 5.6.3 for the code to work properly.

    Best regards,
    Victoria

    #891690

    Thanks 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!

    #892689

    Hi,

    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,
    Ismael

    #893004

    Other 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.
    #893134

    Hi,

    Glad that you found the error. Please feel free to open a new thread if you need anything else. :)

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Change image displayed on taxonomy-portfolio_entries.php and tag.php templates’ is closed to new replies.