• I am trying to get a div, specified by class using phpQuery in Hungryfeed.

    This is the custom template I am using for HungryFeed, which doesn’t work:
    <p>{{select(html).div.stanford-events-date}}</p>

    This works, but is not what I would prefer to use, in case the format of the RSS feed changes:
    <p>{{select(html).div:first}}</p>

    This is the content of the RSS Feed I am trying to get:
    <description>
    <div class=”stanford-events-date”>Date: Ongoing from July 21, 2015 through August 11, 2015. See details for exact dates and times. </div>

    <div class=”stanford-events-location”>Location: Thornton Ctr., Rm 110</div>

    <div class=”stanford-events-description”><p>Carrying forward the interest in contemplation both at Windhover and during Contemplation by Design week last November, the Office for Religious Life (ORL) and HIP are collaborating to continue to offer a labyrinth walking fundamentals workshop. This 2-session program will provide you with knowledge of the rich history and stress reduction and resilience-building benefits of the contemplative practice of labyrinth walking. Each session will begin in the classroom followed by a practicum of walking the Windhover labyrinth. Please note: registration required for this free class. </p>
    <p>Instructors: The Rev. Joanne Sanders, Associate Dean for Religious Life at Stanford, and Tia Rich, PhD, HIP Senior Health Promotion Specialist, and Contemplation by Design program manager. </p>
    <p>Note: This workshop is co-sponsored by the Office for Religious Life and HIP, and is free to Stanford employees. </p>

    <p>(Windhover labyrinth Photo courtesy of LA Cicero/Stanford News Service)</p></div>
    </description>

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jason

    (@verysimple)

    I’ve noticed that sadly phpQuery seems to be lacking in some areas. The project hasn’t been updated in over 5 years. It’s not really a great solution but as far as I know there’s no other solution in php?

    I’ve pretty much resigned to using the child # selectors, even though they might possibly change as you said.

    Thread Starter Skwalin

    (@skwalin)

    I did a quick search around, and didn’t find anything very promising either. I did come across this small project, that uses preg_replace to simulate the CSS3 selectors.
    https://github.com/tj/php-selector

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHPQuery is not respecting div.class’ is closed to new replies.