Support

Home Forums Event Espresso Premium Show EE4 Table view on default Events listing url

Show EE4 Table view on default Events listing url

Posted: October 27, 2014 at 8:30 pm

Viewing 4 reply threads


Adele Haswell

October 27, 2014 at 8:30 pm

Wordpress v4.0 and EE4

I have EE4 Table View Add on and was wanting to use that format to display the Events on default Event Listing URL of /events. However when I add the shortcode to display the Table it is still just showing the default view. How can I change it?


Lorenzo Orlando Caum

  • Support Staff

October 27, 2014 at 10:14 pm

Hi Adele,

The default events CPT slug is a virtual page. You could rename it by using something like this:

https://eventespresso.com/wiki/change-events-cpt-slug/

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_event_slug', 10, 2 );
    function my_custom_event_slug( $slug, $post_type ) {
    	if ( $post_type == 'espresso_events' ) {
    		$custom_slug = array( 'slug' => 'event-listings' );
    		return $custom_slug;
    	}
    	return $slug;
    }

That will free up the default events slug below:

example.com/events/

Be sure to browse to WP-admin –> Settings –> Permalinks to refresh your permalinks afterwards.

Then your WordPress page above will begin to work as expected.

Let us know if this helps.


Lorenzo


Adele Haswell

October 28, 2014 at 5:31 pm

Hi Lorenzo,

That has made the /events page work how I would expect with the Table View shortcode on it.

It would be good if there was a way to let you use the Table view on that top /events/ page without having to add a filter to the functions file.


Lorenzo Orlando Caum

  • Support Staff

October 28, 2014 at 6:28 pm

Hi Adele,

The default events page (example.com/events/) isn’t an virtual page. It won’t appear in WordPress admin –> Pages.

The steps that I shared will free up that slug which will allow you to set it up as you requested.


Lorenzo


Lorenzo Orlando Caum

  • Support Staff

September 12, 2015 at 4:31 pm

Hello again Adele,

I wanted to let you know that there is an enhancement for this that is now available in the current version of Event Espresso 4.

You no longer need to use the filter that is mentioned in the link below to change the events custom post type slug:

https://eventespresso.com/wiki/change-events-cpt-slug/

Instead, you can remove that filter if it is currently in place. Then login to your WordPress dashboard and go to Event Espresso –> Events –> Templates. Then scroll to the Event Listing area and you’ll see an option to specify your slug for the espresso_events custom post type. Here is an example of what it looks like:

http://cl.ly/image/0W3V2L1p1d1q

Note that the option above is available in the current version of Event Espresso 4. If you are running an older version of Event Espresso 4, then please see the steps below for how to upgrade to the current version.

Steps for upgrading Event Espresso 4

First, please backup your WordPress site. Then upgrade to the latest version of Event Espresso 4.

You can see the changelog for Event Espresso 4 here:

https://eventespresso.com/wiki/ee4-changelog/


Lorenzo

Viewing 4 reply threads

The support post ‘Show EE4 Table view on default Events listing url’ 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