Customize no future events page

Home Forums Calendar Products Events Calendar PRO Customize no future events page

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #44631
    Joshua
    Participant

    I would like to customize what is seen when there are no future events on my events page. I’ve been able to edit a line of text on the list view when there is no available events, but how can I add extra customization such as an image.

    #44687
    Jonah
    Participant

    Hi Joshua,

    You would need to add the code for your image to the list.php file. To make changes to that file, make a copy of /wp-content/plugins/the-events-calendar/views/list.php and place in an ‘events’ folder in your active theme. Then you can add whatever code you want.

    I hope that helps.

    – Jonah

    #44699
    Joshua
    Participant

    Hey Jonah. I’ve been able to do that. I have a custom list.php live on my site and have managed to customize the warning text line – however, I haven’t been able to add any extra code. Would it be possible for you give me an example of where custom code would go on list.php to make this work?

    #44713
    Jonah
    Participant

    Hi Joshua,

    Sure. Take a look at this example modifying lines 130-137: http://snippi.com/s/9o55xv5

    Does that help?

    #44731
    Joshua
    Participant

    Hey Jonah. For some reason this code is not working. You can see my code here: http://snippi.com/s/5bz3p4j and the result here: http://new.escoladabiblia.com/cursos/

    #44810
    Jonah
    Participant

    Hi Joshua,

    That’s strange. Are you sure the list.php you made the changes to is in an ‘events’ folder in your active theme? Can you tell me the full path the file and verify it is within your active theme?

    #44921
    Joshua
    Participant

    Hey Jonah. Yes, it is in the events folder within my active theme. I have made changes in the past to both the list.php and single.php – both of which are live and working. For some reason, any code modifying that warning doesn’t work. Don’t really know what to do!

    #44969
    Jonah
    Participant

    Hi Joshua,

    I’m not sure what else to tell you. You’ll need to troubleshoot this by trying to make the same modifications to the core list.php file to see if that shows and/or trying the same things with the default WordPress theme (creating the events folder, etc.) to see if that works. It works fine for me so there must be something you’re not doing right…

    I hope that helps!

    – Jonah

    #45018
    Joshua
    Participant

    Hey Jonah, I sort of figured out what is going on. When I use my theme’s page template for the list view, the custom html does not appear. If I go into the plugin’s settings and resort to the plugin’s default page template, than I can see the custom html. The problem is that I need to use my theme’s page template to view the events. How can I keep this from disabling any custom html?

    #45025
    Jonah
    Participant

    Hi Joshua,

    The Default Events Template contains the tags for displaying the custom HTML you’ve added (tribe_events_before_html() and tribe_events_after_html()). If you want to use your custom HTML you’ll need to add those template tags somewhere in your theme’s page.php template or whatever other template you have selected to use.

    Does that make sense?

    #45085
    Joshua
    Participant

    Hey Jonah, I think I confused things by saying custom html. I added the custom message and image to my list.php. However, these additions are only visible when I choose the default template within The Calendar plugin’s settings. If I choose the setting to use the page template from my theme (which is what I want) – than the custom message and image codes are stripped from view. Why is this only visible on the default template and not on my theme’s page?

    #45227
    Jonah
    Participant

    Hi Joshua,

    I’m not sure what the problem could be, it’s working fine for me using either the Default Page Template or Default Events Template. Have you tried deactivating all other plugins or reverting to the default WordPress theme? If you revert to the default WordPress theme, remember you will need to re-copy in the list.php file into an events folder. It could be a conflict with either your theme or another plugin. Try that and let me know if that works.

    – Jonah

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Customize no future events page’ is closed to new replies.