• How can I select all the text from feed item, but strip other stuff such as images, when there are no specific divs, spans, a’s or p’s available?

    For example {{select(text).*}} does not output all the text in my case although I though it should.

    Or alteranitively, how to apply the :not(selector) parameter to work with such circumstances?

    https://www.ads-software.com/extend/plugins/hungryfeed/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tiedemies

    (@tiedemies)

    The most typical thing happened: I got it cracked with the simplest solution possible just after asking for help.

    So for anyone interested, use {{select(text).}} to get all the text parts of the feed item without css selectors.

    Cheers.

    Plugin Contributor Jason

    (@verysimple)

    awesome glad you got it working!

    another idea is to use the “allowed tags” parameter which lets you strip everything except the HTML tags that you specify. for example allowing “p” and “br” will get rid of all formatting but leave the paragraph and line breaks alone.

    Thread Starter tiedemies

    (@tiedemies)

    I thought of that too, but it got a bit complicated when the feed description looks like this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    And I should be getting only the first image, the first piece of text (“Vedenpit?v?? nahkaa.”), then get the next paragraph (“Tarjoushinta…”, which has no p), add some styling to it and then get the div stuff at the end with a little twist of getting the link separately from there. I’m almost there, but not quite.

    Thread Starter tiedemies

    (@tiedemies)

    Sorry, here’s the code I was referring to.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: HungryFEED] Outputting all feed text without css selectors’ is closed to new replies.