WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] RSS feed widget - garbled text (23 posts)

  1. op_maroon
    Member
    Posted 3 years ago #

    I'm displaying the following feed on my homepage sidebar via the standard RSS widget.

    http://www.purplecircle.co.uk/blog/?feed=rss2

    Getting garbled text at the end of the post, like this:
    $$('div.d1404').each( function(e) […]

    See top right sidebar on the homepage here:
    http://www.purplecircle.co.uk/

    This doesn't appear when there's enough text in the post to reach the […].

    Garbled text doesn't appear in the blog itself but does when you click on categories or tags: $$(‘div.d1404′).each( function(e) { e.visualEffect(‘slide_up’,{duration:0.5}) });

    Any ideas what's going on here?

    And while I'm here if anyone knows how to include a thumbnail from the post in the RSS feed, it'd make my day!

    Thanks

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Ten theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

  3. op_maroon
    Member
    Posted 3 years ago #

    Hi esmi

    Have deactivated all plugins and it doesn't seem to make any difference. I have also temporarily deleted the plugins folder and no luck.

    I previewed the site with the 2010 theme but it didn't change the feed. I'd rather not switch themes as the site is live and I already broke a few things by disabling plugins... Do I need to actually install the theme to see the code changes?

    Thanks for the help!

  4. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Well, it looks like code to me - so it's either your theme or your plugins.

  5. op_maroon
    Member
    Posted 3 years ago #

    If it helps I googled the code and it brings up quite a few results from other blogs:

    "$$(‘div.d1404′).each( function(e) { e.visualEffect(‘slide_up’,{duration:0.5}) });"

  6. op_maroon
    Member
    Posted 3 years ago #

    I just fully activated the 2010 theme and it makes no difference to the feed.

  7. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Why are you pulling your own feed into your home page? That's a really bad approach from a sever.performance perspective. You should be pulling in those post excerpts via a secondary Loop using get_posts.

  8. op_maroon
    Member
    Posted 3 years ago #

    The feed is on the homepage to show a preview of the blog posts.

    Unfortunately I have no idea what 'a secondary Loop using get_posts' is as this is just managed through the RSS feed widget.

  9. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    I did realise the reason for the post display. It's just that your current solution will be hammering your server. If the site gets busy, expect your hosts to be touch complaining about over-consumption of server resources.

  10. op_maroon
    Member
    Posted 3 years ago #

    Sorry I'm a little confused - the current system is simply using the standard wordpress RSS feed widget, is there a better way to set the feed up? Could you elaborate on the secondary loop?

    Or is it going to hammer the server because the main site and blog are hosted on the same server?

    Sorry about the confusion - I didn't implement the theme or the site - just doing my best to sort out a few problems which are proving tricky.

    Thanks again.

  11. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    If you use your RSS feed in the sidebar your own site, you're effectively going to be calling the full feed every time someone move to another page or refreshes the page. That means a whole lot of extra calls on your server. Not quite a 100% increase but certainly a significant amount. This is foolish when you can pull the posts you need from the database and display them on the page far more efficiently using a secondary Loop.

    As for multiple Loops, see this Codex page.

  12. op_maroon
    Member
    Posted 3 years ago #

    Thanks for the suggestion, but that codex page goes way over my head.

  13. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Well - you might want to keep an eye on this thread: http://wordpress.org/support/topic/simplepie-excessive-bandwith-usage?replies=2

    I suspect it's the same situation as yours.

  14. op_maroon
    Member
    Posted 3 years ago #

    Thanks again - I don't suppose there's an alternative RSS widget that uses a secondary loop? Or a way of modifying the standard RSS widget?

    If not I'll try to have a read through the codex page. That kind of stuff gives me a headache though - I don't have much of a code background and am very unfamiliar with PHP.

  15. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    You can't modify the standard RSS widget without getting into some advanced coding. And any plugin that you use to pull your own RSS feed into your own site will have exactly the same effect as you have now.

    Have you tried using the Recent Posts widget?

  16. op_maroon
    Member
    Posted 3 years ago #

    Just had a look at the recent posts widget - looks promising.

    One thing I can't work out though, is how to tell it to grab posts from the blog? The blog is located at /blog and is a separate wordpress install... I can't see the option to link it there.

  17. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    I'm confused. Why is /blog on a separate install?

  18. op_maroon
    Member
    Posted 3 years ago #

    http://www.purplecircle.co.uk is the main site, not a blog, it just happens to be built on wordpress. /blog is a seperate blog with posts formatted differently and different content. Sorry if this wasn't obvious, wordpress was chosen for the main site for usability/upgradability over clunky CMS systems.

    So the problem is bringing in posts from /blog (seperate WP install) to the main .co.uk site.

  19. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    In that case, using the RSS widget may be your only option.

  20. op_maroon
    Member
    Posted 3 years ago #

    I'm doomed, arent I... :)

    I do appreciate the help though. If anyone else has any ideas please shout!

  21. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Well, I've traced the issue back to the RSS feed itself. Which means that the problem is on the Blog site - not the main site. Have you tried doing the whole deactivate plugins/ reset the plugins folder thing on the Blog site?

  22. op_maroon
    Member
    Posted 3 years ago #

    Turns out it was an issue with the way the blog had been setup to feed data to an iphone app, to summarise:

    If a truncated description (WordPress calls this an Excerpt) is not present with a blog post, WordPress supports the synthesis of <description> fields from <content> fields. This is achieved by selecting the "For each article in a feed, show Summary" option within the "Settings>Reading" control panel page. WordPress will then strip all non plain text items (HTML tags / Javascript Code) out the blog post content, truncated it to a few hundred characters and include it as the description. Looks like some javascript is appearing in the <description> field.

    So simply by adding a manual excerpt into the blog post the garbled code dissapeared.

  23. op_maroon
    Member
    Posted 3 years ago #

    Thanks again for the help. I'm starting a new topic now on the thumbnail issue.

Topic Closed

This topic has been closed to new replies.

About this Topic