thumbnail image sizes

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #5131
    Leap
    Member

    Hello,
    I have exhausted my search for the answer to how to change thumbnail sizes in the following line of code: `[category_posts category_slugs=”coming-soon” image_size=’medium’]
    I also tried “medium” as I saw that somewhere too.
    Also tried changing in settings>media>image sizes> thumbnail sizes Nope.
    Then I found this is style sheet` ul.post-list .image-area img {
    width: 90`px; }
    well that worked but is that how its should be changed?
    Thanks,

    #5146
    Raghavendra
    Moderator

    You can use image sizes medium, large, small, mini, large, full, square in the shortcode.

    You can edit the image sizes by modifying code at line number 144 of the file framework/framework.php file (also see line number 136 for mapping from image size specified in the shortcode). You will need to use the Regenerate Thumbnails to regenerate the thumbnails of changed sizes.

    If you are fine with the aspect ratio of one of the image sizes above, you can use CSS to change the image size (width only – height will change automatically). That’s how responsiveness works.

    Hope this helps.

    #5160
    Leap
    Member

    When I change the size in the short code: It has no affect on the image size it stays at mini (ideally changing the image size in the short code is easiest and what I want to use) and not understanding why it has no affect [category_posts category_slugs="coming-soon" image_size="medium"]

    The css does change the image size but distorts it as it only changes the width.
    I regenerated thumbs as well no affect

    I’m not understanding what the hierarchy of the 4 places to change images sizes: css file, framework/framework.php, the image size within the short code or settings>media>image sizes.

    Note: when I change the size of mini in the framework/framework.php it does change the the size but,changing the short code to medium etc.. in the short code as no affect.
    Thanks,

    #5166
    Leap
    Member
    This reply has been marked as private.
    #5180
    Raghavendra
    Moderator

    To fix the issue of jumping image size, pls remove the method –

                $image_size = mo_get_post_image_size($image_size);
    
    

    from the line number 357 of file framework/functions/post-functions.php file. This was done quite some time ago to avoid names like mini for the user. Anyway, I decided to remove it altogether to avoid confusion. You can make the change in the original file itself since we will remove it in the next update.

    To override the framework function, pls have the following in the child theme functions.php file –

    include_once(get_template_directory() . '/framework/framework.php');
    
    class MO_Child_Framework extends MO_Framework {
    
         function get_image_sizes() {
    
            if (!isset($this->image_sizes)) {
    
                $this->image_sizes = array(
                    'mini-thumb' => array(90, 65),
                    'small-thumb' => array(295, 220),
                    'medium-thumb' => array(550, 400),
                    'large-thumb' => array(820, 400),
                    'slider-thumb' => array(1140, 500),
                    'square-thumb' => array(450, 450)
                );
    
            }
            return $this->image_sizes;
        }
    
    }
    
    $mo_theme = new MO_Child_Framework();
    

    and the above child class method will get called automatically instead of the parent one. Pls let me know if you still see issues. Thanks

    #5181
    Raghavendra
    Moderator

    BTW, pls make sure you get the 1.6 or later version of the theme for the above.

    #5185
    Leap
    Member
    This reply has been marked as private.
    #5186
    Leap
    Member

    Yay! that took care of the issue.
    Thanks meteorite! Also successfully put in the override.

    #5187
    Raghavendra
    Moderator

    Glad it worked. I am with you on keep changes limited to child theme only. Will help you in the long run. If you need to know how to update the theme –

    The way I update is to replace all files. No matter what method you use (there are plugins too like this – http://wordpress.org/plugins/easy-theme-and-plugin-upgrades/ to update easily), you will need to backup your changes and redo any changes you made to the files on the new installation.

    Use tools like DiffMerge or WinMerge to compare the old and new files and redo the changes. You will spend probably an hour doing this but not more, specially if you have made changes only to a few select files. The settings data will stay and hence Custom CSS entered into theme options should be fine. It’s always a good idea to have a backup though. Hope this helps.

    Best way to protect yourself from theme updates is to always make changes in the child theme. The theme is mostly child theme friendly and hence when you have time, you can probably go through the changes you have made to the core theme files and try to move them to child theme so that the core files are not affected and upgrades are smoother.

    #5188
    Leap
    Member

    Can you clarify for me:
    I now have basically 3 places where image_sizes array are defined in the .php files:

    agile/framework/framework.php
    agile-child/framework/framework.php
    agile-child/framework/functions.php

    which one actually changes the size? (to add to my issue)I think I’m getting a slow refresh on my server.

    Update: I just tested all 3 locations and it’s still only changing in agile/framework/framework.php

    #5190
    Leap
    Member
    This reply has been marked as private.
    #5198
    Raghavendra
    Moderator

    I thought you said you were able to override it successfully via child theme after posting the code above posted by me. If you are still having trouble, pls post a temp login to your site here in a private message and I can take a look. Since we are trying out PHP code here, I would prefer to have a temporary FTP access as well (a small syntax error can bring down the site and I would not be able to proceed further in WordPress).

    As far as update is concerned, if you have made changes only in the child theme, you can safely replace the parent theme without affecting the child. The ThemeForest downloads always lets you download the latest files only. If you open the style.css file in the agile theme folder, you should see version 2.0 at the top. No need to update the child theme since we do not release any new changes there(it is just a template to start with).

    #5206
    Leap
    Member

    I think I misinterpreted you solution because I did both the changes you described in post 5180 and I think I was supposed to do either or. I had previously Copied
    1. Copied This: agile/framework/framework.php – Into this: agile-child/framework/framework.php (this I think was a mistake)
    2. Removed code in framework/functions/post-functions.php file (as you described)
    3. Then I also added your code (as described)to the functions file.

    Sorry newbie here :0 )

    I had thought I got it right because my site didn’t explode.
    I provided wp credentials in early post but I don’t think it’s necessary.

    If you can possibly clarify which steps above I should or should not have done. and also ultimately which file I should have change the sizes in based on your answer. I think I will be good then. (Need to learn correct way)

    Thanks!

    #5231
    Raghavendra
    Moderator

    No problem. You have it right – the steps 2 and 3 is all you need. First step is not required. The MO_Child_Framework subclass code above will handle overriding of the framework.php code and hence there is no need to copy the contents.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.