About smart algorithm

Mauer Themes Support Bild About smart algorithm

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Paul 1 year, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1309

    aegae
    Participant

    Hello, I enjoy your theme so much. 🙂

    By the way, I want to know how to modify the smart algorithm.

    I DO NOT WANT to use the algorithm.

    Because it often changes the height of some picturee.

    I just want all the pictures to be shown as they are.

    #1335

    Paul
    Keymaster

    Hello Aegae,

    If I understand you right, the following solution should work fine to achieve what you want. This will make it so that all your pictures added to a gallery within a project will be listed one beneath the other, without occasionally being organized in 2 columns.

    Here is what you need to do to achieve that.


    A little disclaimer: It’s best to do such modifications in a child theme, so they do not get overwritten during theme updates. However, of course you can always re-introduce them after a theme update.

    1.
    Go to your functions.php file (located in theme folder) and replace the following three lines:

    Should be around line 186, replace

    add_image_size("mauer_thumb_7", 1320, 982, TRUE); // PhotoSwipe gallery big thumb
    with (if you want wider thumbs as in the demo):
    add_image_size("mauer_thumb_7", 1320, 99999, FALSE); // PhotoSwipe gallery big thumb
    or with (if you want thumbs the width of the text column):
    add_image_size("mauer_thumb_7", 850, 99999, FALSE); // PhotoSwipe gallery big thumb

    Should be around line 489, replace
    $class= "mauer-pswp-gallery-img-" . $i . "-of-" . $images_in_block;
    with
    $class= "mauer-pswp-gallery-img-1-of-1";

    Should be around line 504, replace
    $reg_thumb_size = 'mauer_thumb_8';
    with
    $reg_thumb_size = 'mauer_thumb_7';

    2 (Optional).
    Then if you want the thumbnails to be the width of the text column, go to js/general.js in your theme folder and replace (around line 299)
    function adjustPSWPWidth() {
    with
    function adjustPSWPWidth() { return;

    3.
    Finally install and activate this plugin, go to “Tools” > “Regen. Thumbnails” and regenerate the thumbnails.

    Also, for the galleries to work properly (regardless of whether you’ll be using the above customization or not) you need to upload images that are at least 1320×982 pixels. If you use images smaller than that, you may occasionally run into issues.

    So basically, I’d say just upload the images that are 2100 by the bigger side, and WordPress together with the theme will do the rest for you — creating copies of the image in all the needed sizes including the ones for the galleries.

    Regards,
    Paul

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.