• Resolved Bubbles

    (@ciaobellaz)


    On my [pdb-record] page, I am displaying data using Groups specifically so that the Group Title would appear. Using the default template, it didn’t, so I created a custom template and copied the default code.

    I see <?php $this->group->print_title() ?> is there, and it should print the title on the page, but no go. So I changed that to <?php echo $this->group->title ?>, and it displays the Group titles.

    I would like also to echo or print the NAME field from the currently displayed record so it reads “Group Title: NAME,” and I can’t seem to make it happen using variations of print/echo, $this, $post, and variations on the field/ID.

    Hoping for a little assistance while I manage my way through this blonde moment …

    https://www.ads-software.com/plugins/participants-database/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author xnau webdesign

    (@xnau)

    If you want to show values from a record outside of the loop, you can use the template helper class to access the values and print them.

    The Template Helper Class

    Thread Starter Bubbles

    (@ciaobellaz)

    Thank you, xnau, for responding yet again!

    There are so many moving parts to this thing, and I think my head is spinning at this point. That’s meant as a compliment — all the parts do seem to be moving in the same direction, and the plugin does so much!

    Thread Starter Bubbles

    (@ciaobellaz)

    For other people seeking help who may not have already visited the author’s site, the link in @xnau’s response (https://xnau.com/work/wordpress-plugins/participants-database/participants-database-documentation/participants-database-1-6-api/the-template-helper-class/) is broken. Here’s the correct link: https://xnau.com/work/wordpress-plugins/participants-database/participants-database-documentation/participants-database-api/the-template-helper-class/.

    Instead of adding the NAME field to the headline, since it’s the second field on the form, I changed the CSS for it to make it red, bold, and larger than the other fields on the page, in order for it to stand out. That resolution worked for my purposes.

    I did use the Template Helper Class to pull other fields outside of the loop. I am very well versed in databases and not that well versed in PHP, but I eventually figured it out. Marking this as resolved.

    Thanks for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Print or Echo field elsewhere on page?’ is closed to new replies.