• Resolved CasperB

    (@casperb)


    Hi Jeroen,

    Is there a way or a shortcode that I can show the production categories on the production page itself? Or other post info such as the title?

    {{categories}} and {{title}} do not seem to work on the production page itself.

    Thanks,
    Casper

    https://wordpress.org/plugins/theatre/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jeroen Schmit

    (@slimndap)

    Not without adding some code to you template.
    Inside the template file of a production you can add something like:

    $production = new WPT_Production();
    $args = array(
    'html' => true
    );
    echo $production->title($args);
    echo $production->categories($args);
    Plugin Author Jeroen Schmit

    (@slimndap)

    Or maybe you can just place this shortcode inside the text of your production:

    [wpt_productions post__in="123"]{{categories}}[/wpt_productions]

    Where you need to replace ‘123’ with the ID of the production.

    This may be a bit heavy on the server if you do this in too many places.

    Thread Starter CasperB

    (@casperb)

    Hi Jeroen,

    I am making great progress in developing my own custom post template (single-wp_theatre_prod.php) and have included the above succesfully.

    I have also bought your Kijkwijzer extension (looks great) but echo $production->kijkwijzer($args); results in a fatal error: Call to undefined method WPT_Production::kijkwijzer()

    How do I include the kijkwijzer in a custom template?

    BTW the kijkwijzer div’s do not have a class assigned when using the wpt_events shortcode.

    Cheers,
    Casper

    Thread Starter CasperB

    (@casperb)

    I just tried the solution for the BBFC icons on this page: https://wordpress.org/support/topic/bbfc-icons

    but it results in an empty div (<div class=”wp_theatre_prod_kijkwijzer”></div>) eventhough the kijkwijzer is set for the production.

    Plugin Author Jeroen Schmit

    (@slimndap)

    Casper!

    The proper code is:

    echo $production->custom('kijkwijzer', array('html' => true));

    I just tested it on another website.

    You can expect an update to the plugin soon. This update will automatically import the Kijkwijzer from your ActiveTickets events. I will also look into the missing class.

    Thread Starter CasperB

    (@casperb)

    That’s strange. I get the kijkwijzer icons on the events listing, but not on the production page, using a custom template. I reverted back to the TwentyFifteen theme and only included the above code in the loop:

    $production = new WPT_Production();
    echo $production->custom(‘kijkwijzer’, array(‘html’ => true));

    I’ll send you some evidence links per mail.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Use production shortcodes on production post?’ is closed to new replies.