Home › Forums › Calendar Products › Events Calendar PRO › Widget on just Events Page
- This topic has 2 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 20, 2015 at 8:40 pm #988227
Steven
ParticipantI’m trying to figure out how to add a widget to the main events page ../events.
The only way I can figure out how to do it is to display the widget on every page. However, I do not wish to do this. Can someone please help! 🙂
Thanks. I know it must be something simple. I can’t find anything in the forum with the search ‘widget only on event page’
Best,
Steven
July 21, 2015 at 6:40 am #988326George
ParticipantHey Steven!
The trick here is to set your “Events Template” option to a page template with a sidebar, where you can then add widgets for that page template.
This “Events Template” option can be found in Events > Settings > Display in your admin, and I took a screenshot of it here for reference (it’s a little more than 2/3rds the way down) → https://cloudup.com/c_sbx0aWE6n
Now, if your theme does not have a template with a sidebar, or it does but it’s the same template used everywhere else (which would lead to the issue you described, where the widget shows up everywhere on your site), then unfortunately the only solution is to create a custom page template in your theme and then use that custom template for your events template.
So, let’s say your template with a sidebar is being used everywhere on your site, and is simply “page.php” for example. To make a custom page template for Events, you could basically just duplicate this file exactly as is, an then add a PHP comment at the top of the file to make it its own template.
Please check out the “Creating custom page templates for global use” section of the WordPress guide on doing this, it covers it in good detail → https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/#creating-custom-page-templates-for-global-use
Once your custom template is done (basically the normal template, but just a version of it with a special name so that you can separate it from other instances of the template on your site), you can then just change the name of the registered widget areas in the template to something random, and then these widget areas will only run on this specific template.
After all that, select the template as the Events Template and add widgets to just the widget area in that template, and it should work well.
If all of this sounds complicated, I’m sorry about that – this is unfortunately the best way to achieve what you described. While we do not offer support for code or customizations, hopefully my description of things helps, and hopefully those articles I linked to will help, too.
Good luck with these customizations Steven!
Cheers,
GeorgeAugust 5, 2015 at 7:05 am #993369Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Widget on just Events Page’ is closed to new replies.
