No record was found on one short code, but record was found on others
-
I’ve been trying to create a custom total page. I am using the [pdb_total template=custom] short code. When I remove the custom template, the default totaling page works. However, when I use my custom template, I get the ‘No Record was found’ message (I added in the ‘if ( $this->participant_id > 0 ) :’ to check if it works or not.)
I tried replacing the if check to ‘if (empty($this->shortcode_atts[‘fields’])) :’ just like the default total, but it still doesn’t work.
My other custom templates works, such as single and list, but it is my total that can’t find the record. So what could be causing this problem? Why is $this->participant_id not greater than 0 and causing this error?
I tried removing this ‘if’ check, but when I do I get a major WordPress error message saying: “Warning: Invalid argument supplied for foreach() in C:…\wp-content\plugins\participants-database\classes\PDb_Template.class.php on line 531”
- The topic ‘No record was found on one short code, but record was found on others’ is closed to new replies.