Modifications to event listing page (single-event.php)

Home Forums Calendar Products Events Calendar PRO Modifications to event listing page (single-event.php)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #951171
    faygenholtz
    Participant

    I’d like to modify the single-events listing page in two ways. Currently, when you click on an event title, you are taken to a page which has essentially the same information. We find this page to be redundant and would like to save our viewers the extra click by by-passing this page entirely. Below is what I’d like to be able to do:

    1. We have two event categories: Seminars and Teacher Trainings. We’d like the “Find out more” for those events with the Seminars tag, to go to our Seminars landing page, and those with the Teacher Training tag to go to the Teacher Training landing page.

    2. Underneath the “Find out more” link on all the events, we’d like to have either a “Register Now” link or a “Register Now” button (ideally).

    For #1, I did find the single-event.php file and figured out how to change the “Find out more” text and link. But I need help in writing the code that will direct some links to the Seminars page and other links to the Teacher Trainings page.

    For #2, I’ve tried adding a text link and a button, but neither show up on the events.

    Thank you so much for your help!

    #951234
    Matthew
    Member

    Howdy faygenholtz – those are great questions!

    Nice research on item #1 – that is definitely the right place to look! The link itself is generated by the tribe_get_event_link() function which has a filter of the same name – tribe_get_event_link. Using that filter you should be able to change the URL to something that fits your use case.

    For item #2, there is a handy action in the same file called tribe_events_after_the_content that you can hook to and output anything you’d like and it will appear below the Find out more link!

    Does that steer you in a useful direction?

    #952955
    faygenholtz
    Participant

    Hi Matthew,

    Thank you for your help so far. For Item #1, I do see where I could change the link. What I want to do is add code that recognizes when the event is a Seminar and when it is a Teacher Training event (by the tags), and so the “Read More” link would go to two different places. I do not know how to write this code. If you understand what I’m getting at, can you help?

    For item #2, I can see the “tribe_events_after_the_content” language in the file. The issue I’m having is that when I try to add a link on an “Edit Events” page in the dashboard, the link does not show up. The text is there, but it is not hyperlinked. And a button doesn’t show up at all. In this instance, the link that I want to add would be different for each event. What code do I need to add in the “tribe_events_after_the_content” area of the single-event.php file that would enable me to add links?

    Thanks again!

    #953061
    Matthew
    Member

    As outlined in our forum guidelines, we aren’t able to help with these kinds of customizations (specifically your first item). But we do have some handy resources that might be helpful for you:

    • Themer’s Guide – provides an overview of how to customize the plugin’s frontend appearance.
    • Tutorials – useful tips and tricks for changing how the plugin looks and behaves.
    • Technical Docs – provides an overview of the classes and functions in each plugin
    • The WordPress function has_tag() – allows you to detect if a given post has a specific tag (which may be useful when testing if an event is a Seminar or a Teacher Training!

    For item #2 specifically: since the link would be different for each event, using the tribe_events_after_the_content filter would require some specific customizations to make the links (or buttons) appear there. If you are unable to make that modification and do not know someone whom you can hire, have no fear! We actually keep a list of freelancers who are quite capable of making changes on your behalf. You can obtain this list by emailing [email protected] and requesting it.

    Good luck, and thanks for using The Events Calendar!

    #956749
    Matthew
    Member

    It has been a while since our last communication, so I’m going to go ahead and close out this thread. If you have any other questions, don’t hesitate to start a new one! Thank you 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Modifications to event listing page (single-event.php)’ is closed to new replies.