Support

Home Forums Event Espresso Premium Events Table View Template add-on – remove Register link?

Events Table View Template add-on – remove Register link?

Posted: July 6, 2016 at 3:36 am

Viewing 3 reply threads


hoffman

July 6, 2016 at 3:36 am

Hi there

We have various different types of event; some paid, some free, some need registration and some don’t. For the ones that don’t, we’d like to remove the ‘Register’ link from the table view – all the information is on the page with the table and there’s no need for the user to go anywhere else.

Here’s an example: http://wp4.hoffmaninstitute.co.uk/information-evenings/

If I just code out the column completely, I guess it won’t appear on the ones where we *do* need it… But I can’t work out how to make it not appear?

Might it be possible to hide/remove that column based on a specific category, maybe?

And if so, where would I start?!

Thanks


Tony

  • Support Staff

July 6, 2016 at 4:02 am

The quickest method for this is to just hide the register link on that specific page using CSS. You use the body class of the page and selectors within the Table View to target the table rows. For example:

.page-id-14398 .espresso-table .reg-col, 
.page-id-14398 .espresso-table th:nth-of-type(4) {
    display: none;
}

Which looks like this – http://take.ms/yEghm

Note that CSS will only remove the link on THAT page because it uses the .page-id-14398 class which is the post id for that page. So if you then want to do this again on another page you can do:

.page-id-14398 .espresso-table .reg-col, 
.page-id-14398 .espresso-table th:nth-of-type(4),
.page-id-99999 .espresso-table .reg-col, 
.page-id-99999 .espresso-table th:nth-of-type(4) {
    display: none;
}

Obviously 99999 would be the page id, you can find that within the source code – http://take.ms/8tnlq

The other option is to create your own custom template for the table view add-on that does not load a register not link at all, then place it within your themes root directory and call it with your shortcode using the the template_file attribute.

[ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=name-of-your-custom-template.php]

That tells the add-on to load your template and not the default one.


hoffman

July 6, 2016 at 4:06 am

Thanks Tony – that sounds really promising! Will give it a go. And thank you for your superswift response 🙂


Tony

  • Support Staff

July 6, 2016 at 4:30 am

You’re most welcome.

If you have any problems please let me know.

Viewing 3 reply threads

The support post ‘Events Table View Template add-on – remove Register link?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso