The_excerpt - by acuariopro - on WordPress WooCommerce support

This topic has 10 replies, 2 voices, and was last updated 10 years, 4 months ago ago by Eva Kemp

  • Avatar: acuariopro
    acuariopro
    Participant
    July 25, 2014 at 22:23

    Hello there,

    I´m trying to dysplay the excerpt instead of the content on a category but the excerpt lenght is set to “35” (I need more) and when I try to declare it on my child theme does not work

    I find on the parent theme:

    // **********************************************************************// 
    // ! Set exerpt 
    // **********************************************************************//
    function etheme_excerpt_length( $length ) {
        return 35;
    }
    
    add_filter( 'excerpt_length', 'etheme_excerpt_length', 999 );
    
    function etheme_excerpt_more( $more ) {
        return '...';
    }
    
    add_filter('excerpt_more', 'etheme_excerpt_more');

    How I should declare it on my child theme to make work it on my theme?.

    I was trying with:

    if ( ! function_exists( 'etheme_excerpt_length' ) ) {
        function etheme_excerpt_length() {
            return 350;
        }
    }

    Blessings.

    9 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    July 25, 2014 at 23:00

    Hello,

    Please provide us with the link where you want to make changes and login credentials to your wp-admin panel and FTP in Private Content.

    Regards,
    Eva Kemp.

    Avatar: acuariopro
    acuariopro
    Participant
    July 26, 2014 at 02:46

    Hello Eva,

    It is possible that you send me code to add in functions.php to try first?, I´m working in localhost for now.

    Avatar: Eva
    Eva Kemp
    Support staff
    July 26, 2014 at 10:32

    Hello,

    Please show us a link where you want changes to be made or a screenshot of a page to have clearer understanding.
    Thank you.

    Regards,
    Eva Kemp.

    Avatar: acuariopro
    acuariopro
    Participant
    July 26, 2014 at 15:20

    Sure,

    First I make a copy of the content.php to my child theme and I replace “the_content” for “the_excerpt”

    So my question, is, what should I add into functions.php into my child to replace the function into of the parent theme.

    http://www.acuariopro.com/wp-content/uploads/2014/07/Pantalla-2014-07-26-a-las-9.58.31.jpg
    http://www.acuariopro.com/wp-content/uploads/2014/07/excerpt.jpg

    Thanks.

    Avatar: Eva
    Eva Kemp
    Support staff
    July 26, 2014 at 17:06

    What page are you editing? Is it blog or some page created with Visual Composer editor? If it’s VC, then which element you’re using for your posts.
    Thank you.

    Regards,
    Eva Kemp.

    Avatar: acuariopro
    acuariopro
    Participant
    July 26, 2014 at 17:39

    Thanks Eva,

    This is a category page. I select the category from the menu editor and I add it to the main menu, so is not Blog, it is using category.php to show up. So nothing to do with VC, the styles are different because I change it on my child.

    If is too much trouble, wait for me to have live and then I will send you the access so you can chech it directly.

    Avatar: Eva
    Eva Kemp
    Support staff
    July 26, 2014 at 17:45

    We would be very thankful if you provide us with the access to the site as it’s difficult to give some solution without seeing it.
    If you don’t mind we’ll wait till you provide us with the link and credentials.
    Thank you for understanding.

    Regards,
    Eva Kemp.

    Avatar: acuariopro
    acuariopro
    Participant
    July 26, 2014 at 22:40

    Ok, no problem I will do that, it will take me a time.

    Avatar: Eva
    Eva Kemp
    Support staff
    July 27, 2014 at 10:17

    Thank you.
    Then we’ll wait for your reply with the site credentials.

    Regards,
    Eva Kemp.

  • Viewing 10 results - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.