try shortcode [events_list category=”-X”] where x is the event categories id at Events > Event Categories (to show event category id, click Screen Options > checked ID and click Apply Button)
Is there anyway of doing this in the settings because I have the widget on the homepage which has the View all Events link activated which seems to only point to the page that is selected within the settings.
using events widget, try WP Appearance > Widgets > Events widgets > Category IDs then try -X where x is the event categories id
Sorry the widget is fine on the page needed but id you look at http://www.tsc.mkconsultancy.co.uk/our-events/ the main list of events has a “Football Test” in it near the top but do not want it there. Just want to list Football items on a widget on this page as you will see.
This events page is selected within the Events Settings so I am unable to edit the page.
You will likely need to remove your main events page from the setting at Events > Settings > Pages > Event List/Archives
Then, replace the contents of your events page (it should be “CONTENTS”) with the shortcode Angelo suggested above.
Will give that ago, however how do I then get the widget on the homepage to link to the page that I have this shortcode on?
Do you mean the LIVE:Football widget? Those are links to single events pages so will work fine.
No, on the homepage there is a link on the Events widget that goes to the page that is the page which has the list of events which is the actual page that is selected within the settings.
So if I create a new events page and add the shortcode to it how would I then change the link on the homepage widget to point to the new page I have created?
You can set which page the plugin uses as the Events page by going to Events > Settings > Pages > Events List/Archive > Events page.
I under stand that but I have created a new page and added the shortcode to show a specific category but if I then select that page in Events > Settings > Pages > Events List/Archive > Events page then the shortcode is stripped out the default code use used.
I want that Events page to show a specific category id but still be able
Ok, then I think might need a slightly different approach. Does the category you’re filtering out need to be filtered out throughout the site?
It is only going to be required on the Live: Football widget on the events page and maybe another page with a shortcode but that is it
In that case, the easiest way would probably be to use shortcodes a with category attribute to show that category when needed, while creating a custom version of the events-list.php template that filters out that category.
This tutorial shows you how to create custom templates that are upgrade safe:
The file you need to copy / modify is events-list.php. You’ll need to filter / edit the $args array to exclude the unwanted category.
This thread should help:
Just looking at this and I am not a developer so might need a quick point, I have copied the events-list.php and not sure what I need to add to the page to filter it out?
The current page has the following in it:
$args = apply_filters(’em_content_events_args’, $args);
if( get_option(‘dbem_css_evlist’) ) echo “<div class=’css-events-list’>”;
echo EM_Events::output( $args );
if( get_option(‘dbem_css_evlist’) ) echo “</div>”;
- The topic ‘Hide single category from Events List Page’ is closed to new replies.