Support

Home Forums Event Espresso Premium /events/ listing page 404 error

/events/ listing page 404 error

Posted: April 7, 2015 at 9:32 am

Viewing 3 reply threads


CATHERINE LENNON

April 7, 2015 at 9:32 am

Hello, i get the same error as this post
https://eventespresso.com/topic/events-listing-url-error/, i have tried changing theme, adding the filter to rename the cpt slug, flush my permalinks but nothing. I have created an event which is published and i still get a 404 error. The problem is that i am in localhost working environment. Can you help? Any ideas?


Lorenzo Orlando Caum

  • Support Staff

April 7, 2015 at 9:52 am

Hi Catherine, we tried a few troubleshooting steps in that support post.

Could you take a look at the final solution?

https://eventespresso.com/topic/events-listing-url-error/#post-149593

I see that you tried changing the custom post type slug and refreshed your permalinks.

Do you have at least one event published? Also, does this happen when the site is on defaults:

Default WP theme activated
Event Espresso activated


Lorenzo


CATHERINE LENNON

April 8, 2015 at 1:56 am

Hi Lorenzo, i have tried all of them yes, and i can confirm that i have at least one event published and i have deactivated all plugins except EE4 and i have twentyfifteen theme activated but the problem persists. I also updated to the last version 4.6.19. Do i have to create an archive-events.php or single-events.php file? Also i must say that i have a bunch of custom post types as such (none named events)
// Register Custom Post Type
function efc_defacto() {

$labels = array(
‘name’ => _x( ‘defacto’, ‘Post Type General Name’, ‘efc’ ),
‘singular_name’ => _x( ‘defacto’, ‘Post Type Singular Name’, ‘efc’ ),
‘menu_name’ => __( ‘defacto’, ‘efc’ ),
‘parent_item_colon’ => __( ‘Parent Item:’, ‘efc’ ),
‘all_items’ => __( ‘defacto’, ‘efc’ ),
‘view_item’ => __( ‘View defacto’, ‘efc’ ),
‘add_new_item’ => __( ‘Add New defacto’, ‘efc’ ),
‘add_new’ => __( ‘Add New’, ‘efc’ ),
‘edit_item’ => __( ‘Edit defacto’, ‘efc’ ),
‘update_item’ => __( ‘Update defacto’, ‘efc’ ),
‘search_items’ => __( ‘Search ‘, ‘efc’ ),
‘not_found’ => __( ‘Not found’, ‘efc’ ),
‘not_found_in_trash’ => __( ‘Not found in Trash’, ‘efc’ ),
);
$args = array(
‘label’ => __( ‘defacto’, ‘efc’ ),
‘description’ => __( ‘Post Type Description’, ‘efc’ ),
‘labels’ => $labels,
‘supports’ => array( ‘title’, ‘editor’, ‘excerpt’, ‘thumbnail’, ),
‘taxonomies’ => array( ‘category’, ‘post_tag’ ),
‘hierarchical’ => false,
‘public’ => true,
‘show_ui’ => true,
‘show_in_menu’ => ‘edit.php?post_type=efc_publication’,
‘show_in_nav_menus’ => true,
‘show_in_admin_bar’ => true,
‘menu_position’ => 15,
‘menu_icon’ => ‘dashicons-analytics’,
‘can_export’ => true,
‘has_archive’ => true,
‘exclude_from_search’ => false,
‘publicly_queryable’ => true,
‘capability_type’ => ‘page’,
);
register_post_type( ‘defacto’, $args );
flush_rewrite_rules( );
}

// Hook into the ‘init’ action
add_action( ‘init’, ‘efc_defacto’, 0 );

and this code to solve a problem with accessing custom post types pages
function my_flush_rewrite_rules() {
flush_rewrite_rules();
}
add_action( ‘after_switch_theme’, ‘my_flush_rewrite_rules’ );

Any ideas?


Lorenzo Orlando Caum

  • Support Staff

April 8, 2015 at 7:49 am

Hi, creating a new template isn’t needed. Did you refresh permalinks by browsing to the permalinks page after temporarily moving the site into defaults?

Also, can you confirm that the local host is running Apache or Nginx and not Windows (IIS)?


Lorenzo

Viewing 3 reply threads

The support post ‘/events/ listing page 404 error’ 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