Okay
  Public Ticket #243601
Customize "related works" in single portfolio?
Closed

Comments

  • Mindaugas started the conversation

    How to customize "related works" photos in single portfolio page? I want to have them not croped (a little bit smaller in height) And not more than 4 of them.

    How I can do that? I can edit code if it is possible.

  •  295
    Paul replied

    Hi,

    You can find the code in "/uxb_templates/single-portfolio.php" file for the related works section.

    For the image size of each related item, you can tryt this plugin to create a new custom size: https://wordpress.org/plugins/simple-image-sizes/ then change from the current "uxb-port-related-items" (you can find this in the mentioned file above) into your custom one. 

    After that, re-upload all the images for those items to make WP use the new custom image size you created.

    Hope this helps!

    Cheers,
    Paul

  • Mindaugas replied

    the plugin did not worked for me. I just edited one line (add_image_size( 'uxb-port-related-items', 214, 214 ); in UXB portfolio functions.php. And everyting is ok now.

    Can you tell me how to have not more than 4 related photos under the portfolio item?

  •  295
    Paul replied

    Please open "/uxb_templates/single-portfolio.php" file then find this code:

    'nopaging' 		=> true,

    Change it to:

    'posts_per_page' 		=> 4,

    This should help. :)

    You can also find more info about "WP_Query()" and parameters here: http://codex.wordpress.org/Class_Reference/WP_Quer...

  • Mindaugas replied

    Thanks!

  • Mindaugas replied

    Marking as closed