Displaying entries : $entries_args doesn’t work with “entry_id”
-
Hi, my issue is pretty simple. I’d like to narrow down my entries by entry_id if my ‘entry‘ shortcode attribute is used. I know for sure that my attribute is working, yet my get_entries() never acknowledge this query. For instance, here’s a shortcode :
[wpforms_entries_table id="10569" user="current" entry="145"]
I will get all the entries of my current user, not the 145th one. I’ve done some tests with the snippet you provided, to no avail. Here’s how I’ve added the new attribute :
$atts = shortcode_atts(['id' => '', 'user' => '', 'entry' => '', 'fields' => ''], $atts);
And finally, here’s how I test this same attribute :
if (!empty($atts['entry'])) { $entries_args['entry_id'] = absint($atts['entry']); }
I don’t get where I screwed up. No matter what I do, I can’t isolate any form entry by its id. Any help would be appreciated (and yes, I do use the pro version). Thanks !
- The topic ‘Displaying entries : $entries_args doesn’t work with “entry_id”’ is closed to new replies.