Advertisement
Sadchenko

Программный вывод нод по диапазону даты

Feb 22nd, 2022
1,500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. //Программный вывод нод по диапазону даты
  2. $query = new EntityFieldQuery;
  3. $result = $query->entityCondition('entity_type', 'node')
  4. ->entityCondition('bundle', 'event')
  5. ->propertyCondition('status', 1) // Getting published nodes only.
  6. ->fieldCondition('field_dates', 'value', date("Y-m-d"), '<') // end date before today
  7. ->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement