• Hey,

    Congrats for this beautiful theme. I just have a question I’ve not been able to resolve : I’m looking for the way to reduce height of the featured content area. I found these lines in the CSS file :

    #featured-content.flexslider .slides img {
    	height: auto;
    	margin: 0 auto

    I want to change it by :

    #featured-content.flexslider .slides img {
    	height: 300px;
    	margin: 0 auto

    or

    #featured-content.flexslider .slides img {
    	height: 30%;
    	margin: 0 auto

    But when I do it, it deforms the picture because its height is automatically adapted to the size I give. How can I fix it and reduce height of the featured content keeping the real appaearence of the pictures ?

    Thanks in advance for your help,

    Best regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there, the slider-image dimensions in Superhero are actually set through the functions.php file.

    To change them, you’ll need to first create a child theme, so your tweaks won’t be overwritten the next time Superhero is updated. If you’re new to child themes, you can explore these guides:

    http://codex.wordpress.org/Child_Themes
    http://op111.net/53/
    http://vimeo.com/49770088

    Once your child theme is set up, create a plain-text file and name it functions.php. What you’ll need to do is re-declare the function superhero_setup() in this file. Here are the steps to do that:

    1. Go into the functions.php file in the parent (original) theme, and copy lines 28 through 80, inclusive. Just to be clear, the first line you’re looking for is

    if ( ! function_exists( 'superhero_setup' ) ) :

    and the last line is

    endif; // superhero_setup

    2. Paste these lines into your new functions.php file in your child theme.

    3. Put opening and closing PHP tags around the function:

    <?php
    
    (the function you copied goes here)
    
    ?>

    4. Now, find this line:

    add_image_size( 'slider-img', 1440, 500, true );

    Change 500 to 300, or whatever you want your new height to be.

    5. You will likely need to either re-upload your slider images, or you can run the Regenerate Thumbnails plugin to recreate the slider images at the new size.

    Let me know how it goes!

    Thread Starter Largo007

    (@largo007)

    Hey Kathryn, and thank you very much for your help.

    Before setting up the solution with the child theme, I tried to change size directly in the original functions.php file to have a look at the result. Unfortunately my featured content block simply disappeared ! Why is that ? (I remembered to regenerate the thumbnails before trying)

    Thanks again,

    Best regards,

    Largo007

    (I remembered to regenerate the thumbnails before trying)

    You need to regenerate the thumbnails after making the change in functions.php, so they get regenerated at the newly specified size.

    Let me know if that works and sorry for not making that super clear earlier.

    Thread Starter Largo007

    (@largo007)

    I did, but it doesn’t work. I checked if thumbnails files were in the ‘upload’ folder and they are. But as soon as I change height in the functions.php file, the featured content section disappears and comes back as soon as I put back the original parameter…
    Is there anotther file I should change ?

    Thanks for your help,

    Largo007

    Nope, that’s the only file. Could you provide a link to your site?

    Thread Starter Largo007

    (@largo007)

    Hey Kathryn,

    1. Maybe there should be the begining of the answer : I do not regenerate my thumbnails with any plugin but do it manually because I have specific needs. I followed the recommandations that consists to put in the name of the file the size of the thumbnail, for example, in my case :

    Picexample-1440×300.jpg

    Should it work or is there a file keeping in memory the size of the thumbnails ?

    2. I have another question : how could I remove, in the original theme (not in a child one), date and author appearing on the top of my articles ?

    Thanks again for your help,

    Largo007

    If you still need help with either of the two above items, could you please provide a link to your site so I can take a look directly? Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fetured content height’ is closed to new replies.