🎉 Black Friday Sale is Live: Flat 30% Off on all Products

How to modify what is shown in Calendar Details ? ( Part 2 of 2 )

Minimum Requirements for this documentation:

  1. Video Conferencing with Zoom API https://wordpress.org/plugins/video-conferencing-with-zoom-api/
  2. Video Conferencing with Zoom API PRO https://www.codemanas.com/downloads/video-conferencing-with-zoom-pro/

In part 1 we looked at how to modify the design. In this part we are going to look at how to Show More Options

Firstly before we start, this is a developer level documentation so we are expecting that anyone making these changes are comfortable coding and has a good idea about good coding practices for WordPress.

Show More Options

Now we are going to look at how to show more detail in the popover.
This will be a two part process.
Firstly we would need to follow the steps in part 1 of this series and copy the template file to our theme first.

Theme File Name for Popover
See how it is named in my file

After that if we open the newly copied popover-template.php we can see that there are mustache bar variables used as placeholders for the data to be outputted as bellow

Popover Template
popover-template.php in your theme

Let’s say we have custom fields that we want to show here.
For example the meeting has a custom field called meeting covers and links to a pdf file. So we have custom fields in the back end with the option to link to the pdf url – I created a field called "vczapi_meeting_pdf_link"

So first thing I will do is create a placeholder {{meetingPDFLink}} and add it to “popover-template.php” in my theme.

Placeholder {{meetingPDFLink}} Added

Once the placeholder has been added – we will need to provide the data for it – otherwise it’ll be empty.

To add the data we need to pass the value via the filter vczapi-pro-calendar-extended-props , the 2nd parameter of this function is the meeting id ( post id ).

A few things to remember here, we are appending data into the extendedProps array, the key for the value we are passing must be the same as the one we used as the placeholder.
In this case we are using meetingPDFLink, so the value passed should be: $extendedProps['meetingPDFLink'] = $pdf_html; in your themes functions.php whereas the placeholder must be {{meetingPDFLink}} – please be wary of capital and small cases.
“meetingpdflink” will not work.

Leave a Reply

Your email address will not be published. Required fields are marked *