Despite it not really being best practice, but lacking programmers to work thru the API, I created a customized template directory structure as described here. Then I made a copy of the ICalendar.tpl file (the default one found at wordpress/wp-content/plugins/civicrm/civicrm/templates/CRM/Event/Page), placed it in wordpress/wp-content/civicrm-custom/CRM/Event/Page, and made the modifications to show the registration links (see here for how to locate your template file). The modifications were:
- Before the table begins, add the line
{* CNP force registration links *} {assign var="registration_links" value=true;}
. This is because the registration link code is actually already there but hidden by default (unless you use the Shopping Cart mode - then it becomes an "Add to Cart"). This sets it to show by default.
- In the table's header row, the line
{if $registration_links}<th>{ts}Register{/ts}</th>{/if}
is good as is.
- In the body of the table, I modified the existing IF as so:
{if $registration_links}<td><a {* CNP orig was href="{$event.registration_link}" *} href="{crmURL p='civicrm/event/register' q="id=
$event.event_id"}" >{$event.registration_link_text}</a></td>{/if}
.
- I also moved that link column to be the 2nd column on the event listings page, but that's a matter of personal choice.
Afterwards, remember to add this custom template path in CiviCRM at System Settings, Directories, Custom Template Directory (my path was [cms.root]/wp-content/civicrm-custom/
).