Shortcode: Single record lookup by term not working?
-
Hello and thank you for the plugin.
I’m trying to use a shortcode to show a single record by last name. I couldn’t find the documentation for using “term” but I did step through the code.
I believe it expects something like [pdb_single record_id=smith term=last_name ], but by the time execution reaches the essential part of PDb_Single::__construct() (“determine the ID of the record to show”), the function at Participants_Db::print_single_record() has altered record_id from ‘smith’ to = FALSE.
It seems to ignore its $params and calls self::get_record_id_by_term() with a hard-coded ‘id’ which will never find ‘smith’ or any string in the ID column.
This essentially negates any attempt at using term=___ in the shortcode.
I wouldn’t have enough broader context to unravel what “should” be the patch without breaking something else (or if I’m not even using the correct shortcode syntax), but just wanted to point this out in case you choose to fix it at some time.
thanks again!
- The topic ‘Shortcode: Single record lookup by term not working?’ is closed to new replies.