• Resolved jamesinagiantpeach

    (@jamesinagiantpeach)


    Is anyone else confused as to how one would make a custom template? The documentation alludes to using $showdata to pull specific information except it doesn’t tell us how. A small bit of example code would be fantastic. Specifically I’m trying to re-arrange the default order ‘Date’ ‘City’ ‘Venue’ ‘Country’ and create my own table where I can pull data in td cells at will. As a test, if I type in:

    <table>
       <tr>
          <td>
             <?php echo $showdata['tour']; ?>
         </td>
       </tr>
    </table>

    nothing appears in that <td>… am I missing something here?

    https://ww.wp.xz.cn/plugins/gigpress/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jamesinagiantpeach

    (@jamesinagiantpeach)

    I just realized that in order to make my own changes I needed to call <?php echo do_shortcode( '[gigpress_shows]' ); ?> from my custom page template. THEN copy and paste the Templates folder from the Gigpress plugin directory over to my child theme and rename it gigpress-templates. Then, within that folder you can customize shows-list.php directly without affecting the master.

    My knowledge of PHP is miniscule but is there a reason I can’t just work $showdata variables into my custom page template like above and have it output the data I need? Anyways, in case anyone else couldn’t quite figure it out… that’s what was up for me.

    Geoff Graham

    (@geoffgraham)

    Hey @jamesinagiantpeach,

    Great question! Yeah, that totally possible. You can use the $showdata variable to call specific bits of information from the post, but the shortcode is going to be your quickest bet.

    Cheers!
    Geoff

    Thread Starter jamesinagiantpeach

    (@jamesinagiantpeach)

    @geoffgraham Thanks for your response Geoff. I appreciate and this plugin is such a boon to musicians and their developers everywhere. Fantastic work.

    Do you think you could show us how we could use $showdata in the contact of creating a custom table row with Gigpress? Or is it so complicated that it is not worth exploring?

    Geoff Graham

    (@geoffgraham)

    Thanks so much for the kind words!

    The $showdata variable is a template tag, so you would need to call it first first before being able to echo it in PHP. Our documentation has an example of how template tags work with some working examples:

    http://gigpress.com/docs/#templatetags

    Cheers!
    Geoff

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom Templates’ is closed to new replies.