• 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”

    • This topic was modified 5 years, 1 month ago by expserv.
    • This topic was modified 5 years, 1 month ago by expserv.
Viewing 1 replies (of 1 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Hard to say what’s going on without seeing your template, but the “$this->participant_id” test won’t work on list templates. The “total” shortcode is a special kind of list shortcode and so the templates work in basically the same way.

    What are you trying to accomplish? Maybe try the question from that angle…

Viewing 1 replies (of 1 total)
  • The topic ‘No record was found on one short code, but record was found on others’ is closed to new replies.