Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #14981

    Is there a way to customize the excerpt size on the blog? I see on the demo theme the blog posts are already excerpted but I was unable to find a setting to make that happen, even with putting text in the excerpt area.

    Any ideas?

    #85748

    Hello,

    On your post editor, try to place <!– more –> after the paragraph or sentence that you wanted as excerpt.

    Regards,

    Ismael

    #85749

    There’s no way to have it automatically excerpt a post? I put out 3-4 posts a day and that’s going to be tedious to keep doing.

    #85750

    You can try to replace following code in includes/loop-index.php:

    $current_post['content'] 	= get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');

    with:

    if(is_single())
    {
    $current_post['content'] = get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> &rarr;</span>');
    }
    else
    {
    $current_post['content'] = get_the_excerpt() . '<a href="'.get_permalink().'">Read more <span class="more-link-arrow"> &rarr;</span></a>';
    }

    #85751

    Hi, I’d like some help on this too.

    I am using “the_excerpt” text in the woo commerce pages to enable me to add some text underneath the product name on the shop page. So I have enabled the excerpt in the plugin template but of course this just shows the default number of words from the page. What happened to the excerpt box that I remember appearing in the wordpress dashboard allowing you to over ride the default by inserting specific text?

    Susan

    #85752

    Hi,

    To customize the number of words in an excerpt. Just open functions.php and on the bottom, add this code:

    function custom_excerpt_length( $length ) {
    return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    Just replace return 20; (this would return 20 words), with number of words you want to appear. :)

    Regards,

    Ismael

    #85753

    Hi thanks Ismael, this worked, but I realised it had some limitations that made it unsuitable for me – mainly because the text that I wanted picked up by the excerpt is styled in columns and this means that it is ignored by the excerpt function. So I added some code to one of the woo commerce files that enabled me to use the excerpt box for specific text i wanted to appear as the excerpt underneath the product name on the shop overview page. In Propulsion this is the short description box. however this left me with the short description displayed on the product detail page. How can I disable the appearance of this text on this page?

    Susan

    #85754

    Hi Susan,

    Add this to your custom.css to hide the tab from displaying.

    div.product .woocommerce_tabs ul.tabs li:first-child,
    #tab-shortdescription {
    display:none;
    }

    Regards,

    Mya

    #85755

    that’s done the trick Mya, thanks.

    Just one other quick question. I should like the product price to appear underneath the product description. The way it’s displaying at the moment is that the price comes directly underneath the thumbnail with the description underneath that. Is there a way of swapping the order around?

    Susan

    #85756

    Hi Susan,

    First add the following to your Quick css:

    #top.single-product .price_container {
    display: none;
    }

    Then, in config-woocommerce>config.php search for:

    add_action( 'woocommerce_single_product_summary', 'avia_woocommerce_template_single_excerpt', 10, 2);

    and replace it with:

    add_action( 'woocommerce_single_product_summary', 'avia_woocommerce_template_single_excerpt', 10, 2);
    add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price',20,2);

    That should do it.

    If you have any other questions for the Propulsion theme, please ask them in the Propulsion forums here: http://www.kriesi.at/support/forum/propulsion

    Regards,

    Devin

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Custom Excerpt size?’ is closed to new replies.