0
Welcome Guest! Login
0 items Join Now

Adjusting excerpt text limit in WP/Helium on blog list pages

  • Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago
    • Helium for Wordpress does not seem to use any excerpt limit other than from the Read More tag. I've tried to apply a static character limit as people have done on other standard (non-gantry) WP themes but it didn't work with Helium. It looks like Helium uses the excerpt field on each post but I can't find any controls to limit it.

      How can I limit the number of words or characters shown in a blog post's excerpt?
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago
  • Re: Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago
    • Sorry to bump but did you find anything out on this?
  • Re: Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago
    • Any idea yet on how to limit blog exerpt length in Gantry 5 for WP?
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago
    • You will need to override this file:
      /views/partials/content.html.twig
      copy it here:
      custom/views/partials/content.html.twig

      and try to replace this line 46:
      <div class="post-excerpt">{{ post.post_excerpt|apply_filters('the_excerpt')|raw }}</div>

      with this:
      <div class="post-excerpt">{{ post.post_excerpt|apply_filters('the_excerpt')|truncate_text(45) }}</div>
    • Available for CUSTOM WORK with Joomla, WordPress and Grav Templates and Gantry Framework!
  • Re: Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago
    • Awesome! Thank you. That worked great.

      Sorry to ask but since you seem to know what you are doing (and since this is in the same area of the site) any idea how to answer this question as well:

      www.rockettheme.com/forum/free-wordpress...w-to-do-in-wp-helium

      It looks like the fix should be in the very next section of that same file you just had me change but I don't have a clue on how to do it...
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: Adjusting excerpt text limit in WP/Helium on blog list pages

    Posted 7 years 6 months ago

Time to create page: 0.053 seconds