The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Fetured content height (8 posts)

  1. Largo007
    Posted 2 years ago #


    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


    #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,

  2. 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:


    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:

    (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!

  3. Largo007
    Posted 2 years ago #

    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,


  4. (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.

  5. Largo007
    Posted 2 years ago #

    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,


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

  7. Largo007
    Posted 2 years ago #

    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 :


    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,


  8. 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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.