error message for the slug

Home Forums Calendar Products Events Calendar PRO error message for the slug

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1041888
    Birgit Bauer
    Participant

    Hello,

    i wonder why I get an error message for my slug. I changed the slug for the event. And I wanted to but I get this error: http://screencast.com/t/TL1a5wludQ

    How can I get rid of this message … since I don’t want to use the default URL ‘events’ ?

    #1042420
    Nico
    Member

    Hi there Birgit,

    Thanks for reaching out on this! I’ll try to clarify on this.

    You are seeing the message because there’s a page with the same slug as the calendar slug. There’s nothing wrong with that, but as the messages states, the calendar will be shown instead of the page with the same slug. Some users do this intentionally to have a menu item or something similar. If you want to remove the message just add the following snippet to your theme functions.php file (wp-content/themes/active_theme/functions.php):


    // remove slug conflict admin notice
    if (class_exists('Tribe__Events__Admin__Notice__Archive_Slug_Conflict')) {
    remove_action( 'admin_init', array( Tribe__Events__Admin__Notice__Archive_Slug_Conflict::instance(), 'maybe_add_admin_notice' ) );
    }

    Please give that a try and let me know,
    Best,
    Nico

    #1052646
    Birgit Bauer
    Participant

    Hello, finally I got to that point. I used the code but for any reason the message is still there.

    Here is what I did:

    I took the functions.php of my child theme and added the code like this:

    <?php
    //
    // Recommended way to include parent theme styles.
    //  (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
    //  
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array('parent-style')
        );
    }
    //
    // Your code goes below
    //
    
    // remove slug conflict admin notice
    if (class_exists('Tribe__Events__Admin__Notice__Archive_Slug_Conflict')) {
      remove_action( 'admin_init', array( Tribe__Events__Admin__Notice__Archive_Slug_Conflict::instance(), 'maybe_add_admin_notice' ) );
    }

    Is there any mistake?

    #1054967
    George
    Participant

    Hey there,

    Apologies for the delayed reply, Nico’s been out-of-office for a bit so I wanted to chime in here to keep things moving!

    I do not spot an error in your code; however, its placement in your child theme’s functions.php file might be relevant to the lack of functionality. If you place it in the PARENT theme’s functions.php file does anything improve? I doubt this will help but am curious.

    A bigger point here is that you should not have a page that has the /events/ slug – hence the display of that error message. So an even better solution than the custom code would be one of these options:

    1. Delete the page whose slug is /events, or just change its slug at least.

    2. Change the “Events slug” option for your events calendar so that is not also trying to exist at /events – you can change it to /calendar, /agenda, anything at all. Check out Events > Settings in your site’s wp-admin to see the options for changing slugs.

    Either option here may help and is recommended much more than the code change is.

    I hope this information helps!

    Sincerely,
    George

    #1057995
    Birgit Bauer
    Participant

    Hi George, I just deleted the page .. was the simplest way for me …

    Thank you!

    #1058010
    George
    Participant

    Glad to hear it! 😀

    Thanks for the update here – best of luck with your site.

    – George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘error message for the slug’ is closed to new replies.