• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Trying to control length/# of RSS words broadcast, snippet provided not working?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Trying to control length/# of RSS words broadcast, snippet provided not working?

This topic is: not resolved

Tagged: feed, length, number of words, rss, xml

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 2 months ago by Christoph.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 18, 2016 at 3:30 pm #176881
    StacyN
    Participant

    I have used the tutorial here: https://my.studiopress.com/snippets/post-excerpts to see if we can have our RSS feed excerpts increase in length from the standard 55 words - to 100 words.

    My client wants his RSS feed to stream into Aweber to populate an email broadcast daily. He doesn't want the whole story to go out, but he's finding 55 words to be too small.

    from here: https://my.studiopress.com/snippets/post-excerpts

    Below is the code to modify the length of the post excerpts:

    //* Do NOT include the opening php tag shown above. Copy the code shown below.
    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 50; // pull first 50 words
    }

    I have set this up as:

    //* Do NOT include the opening php tag shown above. Copy the code shown below.
    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 100; // pull first 100 words
    }

    Nothing changes in the feed which can be seen here on our staging server: http://f9f.6d5.myftpupload.com/feed I've noticed in Firefox, it's showing the standard 55 words.

    In Internet Explorer, the whole entire story shows despite the settings of Genesis being set to:
    For each article in a feed, show:

    __ Full text
    X Summary

    http://f9f.6d5.myftpupload.com/feed/
    January 19, 2016 at 2:39 pm #176954
    Christoph
    Member

    Hi Stacy,

    I just tested the snippet on a local website with News Pro and it worked fine.

    Are you using any kind of caching on your staging server?


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble