Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #237894

    Hi,
    I saw a closed thread on how to adjust the height of the frontpage slideshow in Angular by editing functions.php . I’d like to do this in a child theme, but it’s not working. What code from the parent theme needs to be included?
    Thanks!

    #237905

    Hi!

    Can you link the closed thread you mention?

    Regards,
    Josue

    #238160

    no problem

    http://www.kriesi.at/support/topic/angular-homepage-slideshow-size/

    Thanks for responding, I think I’m going to enjoy this theme. I’ve just got some nuts and bolts to configure but want to do it in a child theme so I can upgrade in place…
    M

    #238488

    Hi!

    Try putting global $avia_config; in the first line of your child functions.php:

    global $avia_config;
    
    $avia_config['imgSize']['featured'] = array('width'=>930, 'height'=>340);
    

    Regards,
    Josue

    #239016

    Thanks Josue,
    I tried that but still no luck. My functions.php file consists of only the following:

    global $avia_config;
    $avia_config['imgSize']['featured'] = array('width'=>930, 'height'=>603);

    I know the child-theme is in play because my header and footer.php files are behaving as expected. I regenerated the thumbnails after uploading the new functions.php file so I’m not sure what the problem could be.
    Any ideas?
    Thanks,
    Michael

    #239091

    Hi!

    Try the following:

    function change_imgsize() {
    global $avia_config;
    $avia_config['imgSize']['featured'] = array('width'=>930, 'height'=>603);
    }
    add_action( 'init', 'change_imgsize');
    

    Best regards,
    Josue

    #239556

    Thanks, unfortunately no luck. I think the problem is in the regenerate-thumbnails process. The child theme function is getting called because I can see in the markup the new height for the featured image, but the image that loads in is still the short height. I removed the images from the server and re-uploaded just in case but it still regenerates thumbnails at the parent theme height for $avia_config['imgSize']['featured'] . How would you recommend proceeding?
    Thanks,
    Michael

    #239568

    Hi Michael!

    Try with this plugin to regenerate the thumbnails:

    http://wordpress.org/plugins/regenerate-thumbnails/

    Regards,
    Josue

    #239572

    Hi again Josue,
    That’s the one I’m using, “Version 2.2.4, By Viper007Bond” …
    M

    #239574

    Do you have any caching plugin activated?

    Regards,
    Josue

    #239577

    no, regenerate-thumbnails is my only active plugin…

    #239581
    #239591

    hrm, yes I think we’ve hit the root of the problem. The thumbnail-regeneration doesn’t consult the child-theme’s $avia_config.

    Specifically, when I run force-regenerate-thumbnails, I get the following report snippet:

    BaseDir: /home/studiosusane/www/wp/wp-content/uploads
    BaseUrl: http://wp.studiosusane.s460.sureserver.com/wp-content/uploads
    Image: /home/studiosusane/www/wp/wp-content/uploads/2014/03/home_slide2.jpg
    Regenerate: 300x194, 36x36, 446x151, 465x220, 465x346, 609x210, 630x408, 688x151, 80x80, 930x340
    Successfully regenerated in 1.222 seconds

    In the web view of the site, I know that the child-theme’s function.php is getting called because the markup for this featured image on the home page is:
    <img data-imgw="930" data-imgh="603" alt="" title="home_slide2" src="http://wp.studiosusane.s460.sureserver.com/wp-content/uploads/2014/03/home_slide2-930x340.jpg" style="left: 0px;">

    Note the discrepancy between the data-imgh attribute and the filename for the image…
    M

    #239600

    Hi!

    I think you need to modify the code in functions.php to this:

    function change_imgsize() {
    global $avia_config;
    $avia_config['imgSize']['featured'] = array('width'=>930, 'height'=>603);
    avia_backend_add_thumbnail_size($avia_config);
    }
    add_action( 'init', 'change_imgsize');

    Cheers!
    Josue

    #239601

    Wow, I think that did it. Thanks for bearing down on this with me Josue!
    Michael

    #239602

    You are welcome Michael, glad we could help :)

    Regards,
    
Josue

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

The topic ‘Angular Front Page Slideshow Height’ is closed to new replies.