Title: PHPQuery is not respecting div.class
Last modified: August 30, 2016

---

# PHPQuery is not respecting div.class

 *  [Skwalin](https://wordpress.org/support/users/skwalin/)
 * (@skwalin)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/phpquery-is-not-respecting-divclass/)
 * 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://wordpress.org/plugins/hungryfeed/](https://wordpress.org/plugins/hungryfeed/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/phpquery-is-not-respecting-divclass/#post-6350406)
 * 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](https://wordpress.org/support/users/skwalin/)
 * (@skwalin)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/phpquery-is-not-respecting-divclass/#post-6350420)
 * 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](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.

 * ![](https://s.w.org/plugins/geopattern-icon/hungryfeed_5ea4d7.svg)
 * [HungryFEED](https://wordpress.org/plugins/hungryfeed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hungryfeed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hungryfeed/)
 * [Active Topics](https://wordpress.org/support/plugin/hungryfeed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hungryfeed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hungryfeed/reviews/)

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [selector](https://wordpress.org/support/topic-tag/selector/)

 * 2 replies
 * 2 participants
 * Last reply from: [Skwalin](https://wordpress.org/support/users/skwalin/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/phpquery-is-not-respecting-divclass/#post-6350420)
 * Status: not resolved