WordPress.org

Ready to get started?Download WordPress

Forums

HungryFEED
HungryFEED -I can't get the text- (7 posts)

  1. Ngariv
    Member
    Posted 1 year ago #

    Hi there!
    Thanks a lot for this fantastic plug-in. It works great for me, but a have a little thing i just can't make work.

    I followed your tutorial video about selectively display parts of the descriptions: this one

    It works fine, but the problem comes when i try to extract just the text. In the video, you use the line:
    {{select(text).span:first}}
    ... but my text doesn't come inside a span tag. My feed comes like this:

    <div class="hungryfeed_item_description"><div><a href="http://www.deviajeporespana.com/fiestas/?p=84" title="Fiesta de los escobazos, Jarandilla de la Vera"><img src="http://www.deviajeporespana.com/fiestas/wp-content/uploads/2012/07/Fiesta-de-Los-Escobazos-Cartel-oficial-de-la-festividad-150x150.jpg" alt="Cartel oficial de la fiesta de Jarandilla de la Vera" class="Thumbnail thumbnail " width="100" /></a></div>La fiesta de Los Escobazos esta declarada de interes turistic...</div>

    I tried everything to get the text, but i finally gave up.
    I'd really appreciate any help you could give me.

    http://wordpress.org/extend/plugins/hungryfeed/

  2. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    Yea phpquery is kinda tricky to work with. If you're trying to get to those title attributes in the html then you can do that with something like this (basically get the title attribute of the first "a" tag):

    {{select(attr:title).a:first}}

    If you're trying to get the text itself, then it does look like the text is actually a child of the first div. then that div has another nested div, but the text is only inside the first div, not the second - kinda wonky formatting but anyway this might work:

    {{select(text).div:first}}

    Hope that helps...

  3. erwpacc
    Member
    Posted 1 year ago #

    sorry to piggyback on this thread, but I have the same problem and am trying to get the text "©2012 Bob Englehart, The Hartford Courant" from the description below:

    <description>
    <a href='URL omitted'><img border='0' src='URL omitted' alt='Bob Englehart, Labor Day, , bailouts, business, conservative, economy, holiday, jobs, labor day, liberal, unemployment' ></img></a><BR><BR>©2012 Bob Englehart, The Hartford Courant
    </description>
  4. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    I think this may work...

    {{select(text).a:first}}

    basically selecting the text within the first "a" tag.

  5. erwpacc
    Member
    Posted 1 year ago #

    no luck...
    the thing that has me stumped is that the text is not within the "a" tag
    is there a way to grab the text within the "description" tag?

  6. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    Is there an actual description tag? if so then this should work:

    {{select(text).description:first}}

  7. erwpacc
    Member
    Posted 1 year ago #

    still no luck =(
    just to clarify, the "description" tag is from the rss feed itself, there's no additional (nested?) description tag w/in the description section of the rss feed

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags