Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Sorry, meant “ticket phone” field, not venue

    Thank you. I do shows of different lengths but this may help the OP. I was able to automate a bit more than I previously posted by using the venue phone field to hold the end time, leaving the Notes field for just offers and images.

    It looks to me like Gigpress does have an end date datetime field, exposed by the multi-day checkbox? The date portion of that field is currently supported, but the time portion is not. I would urge you to at least add that support, if not full Google markup compliance.

    For completeness, in addition to the fields I noted above, Google expects a schema.org “offers” section with a separate entry for each ticket price option (e.g. in advance vs at the door, student discount, etc.) which would require a relational back end setup instead of the current single text field.

    OK, I know this is a terrible kludge. I wanted to be able to follow Google guidelines (including having markup only appear on unique event urls) with minimal effect on plugin updates.

    SETUP
    1) Turn off gigpress’ schema.org markup setting

    2) Install “No future posts” plugin so related posts for upcoming events can be published

    3) Add the code below to output/gigpress_related.php. Store a copy of that file in the gigpress-templates folder as it will be overwritten by plugin updates. Remember to copy the custom version back after each plugin update.

    if(is_single() ){
    if(strtotime($showdata[‘iso_date’])>time()){
    $search = array(““”,”””,”″”);
    $replace = ‘”‘;
    echo ‘<script type=”application/ld+json”>{‘;
    echo str_replace($search,$replace,$showdata[‘notes’]);
    echo ‘}</script>’;
    }}

    (The replace is to take care of stray smartquotes.)

    PER EVENT
    1) Enter Google-compliant markup manually in the event notes field. https://developers.google.com/search/docs/data-types/event

    2) Assign a related post that contains the gigpress related shows shortcode.

    3) Use Google’s validator on the related post url to test results https://search.google.com/test/rich-results?utm_campaign=sdtt&utm_medium=message

    Well, probably more than three lines of code to add fields to the back end, UI, and output scripting. 😉 My workaround involves a custom gigpress_related.php with some raw markup stored in the Notes field (ugh). Google’s guidelines are that an event’s markup should only appear on a single page within a site and it doesn’t seem necessary for past events. I’m a very casual php user not familiar with github and the open source development process. I understand you don’t want to add fields that might compete with your other event product, but if you’re going to say you have schema.org event markup support it needs to pass Google’s validator.

    As far as I can tell, Gigpress can’t truly support Google’s expected schema.org event markup subset without at least adding fields for venue time zone, event ending time, and event image (3 different aspect ratio urls). Like the OP I cobbled together a custom/manual workaround.

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