Title: BUG: shortcode in date-query not applied
Last modified: December 19, 2020

---

# BUG: shortcode in date-query not applied

 *  [skrombach](https://wordpress.org/support/users/skrombach/)
 * (@skrombach)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/bug-shortcode-in-date-query-not-applied-2/)
 * I stumbled upon an old post in this forum that finally made my headache go away
   🙂
 * Seems like this bug ([https://wordpress.org/support/topic/bug-shortcode-in-date-query-not-applied/](https://wordpress.org/support/topic/bug-shortcode-in-date-query-not-applied/))
   is still not fixed in the plugin.
 * [@exed-internet](https://wordpress.org/support/users/exed-internet/) wrote:
 * > Hi,
   > Just noticed, that the w4pl shortcodes for date and time are not applied in
   > the helper-posts-date_query.php file.
   > Please add the following snippet in the parse_query_args function, on line 
   > 219.
 *     ```
       // parse shortcode from date values, this allows to use dynamic values
       if( is_array($dq['value']) ){
         $dq['value'] = array_map('do_shortcode', $dq['value']);
       }
       elseif( !empty($dq['value']) ){
         $dq['value'] = do_shortcode($dq['value']);
       }
       ```
   
 * I added the code to line 233 in helper-posts-date_query.php and finally got the
   w4pl_date shortcode to work!
    -  This topic was modified 5 years, 4 months ago by [skrombach](https://wordpress.org/support/users/skrombach/).
    -  This topic was modified 5 years, 4 months ago by [skrombach](https://wordpress.org/support/users/skrombach/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Shazzad Hossain Khan](https://wordpress.org/support/users/sajib1223/)
 * (@sajib1223)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/bug-shortcode-in-date-query-not-applied-2/#post-13837036)
 * Thank you very much for reporting the bug. I will include that in next update.

Viewing 1 replies (of 1 total)

The topic ‘BUG: shortcode in date-query not applied’ is closed to new replies.

 * ![](https://ps.w.org/w4-post-list/assets/icon-128x128.png?rev=3034626)
 * [W4 Post List](https://wordpress.org/plugins/w4-post-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w4-post-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w4-post-list/)
 * [Active Topics](https://wordpress.org/support/plugin/w4-post-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w4-post-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w4-post-list/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Shazzad Hossain Khan](https://wordpress.org/support/users/sajib1223/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/bug-shortcode-in-date-query-not-applied-2/#post-13837036)
 * Status: not resolved