Support » Theme: ColorMag » Colormag Excerpts…

  • Resolved nffox

    (@nffox)


    First of all, thank you very much for this wonderful theme.

    I have a few little questions.

    1. The first one is about excerpts. I found a code and put it in functions.php, but it seems to change nothing. I need to limit the excerpts of the home page posts to 200 words each:

    * @param int $length Excerpt length.
    * @return int (Maybe) modified excerpt length.
    */
    function wpdocs_custom_excerpt_length( $length ) {
    return 200;
    }
    add_filter( ‘excerpt_length’, ‘wpdocs_custom_excerpt_length’, 999 );

    I also tried to put it in the child theme’s function php but it gave me this error on the top of dashboard:

    function wpdocs_custom_excerpt_length( $length ) { return 200; } add_filter( ‘excerpt_length’, ‘wpdocs_custom_excerpt_length’, 999 );
    Warning: Cannot modify header information – headers already sent by (output started at /home3/alef0071/schreiber.press/wp-content/themes/colormag_child/functions.php:8) in /home3/alef0071/schreiber.press/wp-includes/functions.php on line 5946

    Warning: Cannot modify header information – headers already sent by (output started at /home3/alef0071/schreiber.press/wp-content/themes/colormag_child/functions.php:8) in /home3/alef0071/schreiber.press/wp-admin/includes/misc.php on line 1252

    Warning: Cannot modify header information – headers already sent by (output started at /home3/alef0071/schreiber.press/wp-content/themes/colormag_child/functions.php:8) in /home3/alef0071/schreiber.press/wp-admin/admin-header.php on line 9

    >>>
    Could you please help me with code, and where should I insert it? Child or parent theme?

    2. Second, I need to get rid of a blank line (don’t want any space) between navbar and header image on Mobile view.

    Please see the screen (Samsung J5, Chrome):
    https://photos.app.goo.gl/3Rwn3rM6mqMLmNhQ6

    Tried to add this code to Custom CSS, but nothing changed:

    #header-text-nav-wrap {
    padding: 0;
    margin-top: 0rem; margin-bottom: 0rem;
    border-radius: 0rem;
    }

    #header-image-wrap {
    padding: 0;
    margin-top: 0rem;
    margin-bottom: 0rem;
    border-radius: 0rem;
    }

    Thanks in advance!

    The page I need help with: [log in to see the link]

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