Home Forums ASE Support Chapter Minimum Height

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13529
    Cosmin Bumbutz
    Participant

    Hi,

    If you don’t specify a minimum height for the chapter, 260px will be used. This causes a very unpleasant space between the title and the content of the chapter. I believe the default minimum height in the past was 60px, but I’m not sure.

    It also causes a lot of work for new articles but especially for old ones that need to be re-edited in order to manually populate a value for every chapter.

    Can you please look into it?

    Thanks

    #13530
    Hyun Supul
    Keymaster

    Hi I will provide filter codes you can use to change the default minimum height for your site in a day or so. (Along with instructions on where to put the codes) I am afraid if I change the default for ASE again it may affect other people. Thank you for your patience.

    #13550
    Hyun Supul
    Keymaster

    Hi you can use the following filter PHP code to change the default height of Chapter Component

    function example_callback( $args ) {
    	if ($args['minheight'] == '260px') {
    		// if set to default, change the default value
            $args['minheight'] = '60px';
    	}
        return $args;
    }
    add_filter( 'aesop_chapter_defaults', 'example_callback' ); 

    You can put the above code into your theme’s functions.php file. Or you can use a custom PHP plugin that would lets you do the same. The former is the simplest way.

    You may notice that when you change the height to 60px the chapter title goes out of the bound. You can use the following custom CSS code to fix that issue. I recommend Simple Custom CSS plugin.

    .aesop-article-chapter .aesop-cover-title {
        position:inherit;
    }
    • This reply was modified 4 years, 11 months ago by Hyun Supul.
    • This reply was modified 4 years, 11 months ago by Hyun Supul.
    #13881
    Cosmin Bumbutz
    Participant

    Hi,

    I just tried the fix above and I’m afraid it doesn’t work.
    Neither the function, not the CSS.

    We are using Novella, and I have added:

    function example_callback( $args ) {
    	if ($args['minheight'] == '260px') {
    		// if set to default, change the default value
            $args['minheight'] = '60px';
    	}
        return $args;
    }
    add_filter( 'aesop_chapter_defaults', 'example_callback' ); 

    to our functions.php inside Novella.

    The result:
    Parse error: syntax error, unexpected ‘add_filter’ (T_STRING), expecting function (T_FUNCTION) in /themes/novella/functions.php on line 65

    I said OK, I will add the min-height to each chapter as we need to publish an article soon. Setting the min-height to 60px does not work, so I overrode the CSS as indicated by you:

    .aesop-article-chapter .aesop-cover-title {
        position:inherit;
    }

    No luck, the 60px min height is still ignored, even when set on the chapter component.
    I ended up adding

    .aesop-article-chapter {
        height: 60px !important;
      	min-height: 60px !important;
    }

    as we really need this fixed. Currently, the height is set to 736px??? Why?

    Can we get around this? Thanks.

    #13883
    Hyun Supul
    Keymaster

    Hi, about the codes I have given you:

    Try adding that code at VERY END of functions.php. I think that should work.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.