• Unfortunately your plugin seems to not check for custom taxonomies like it should in combination with The Events Calendar.

    There’s a site about this problem: Showing events and venues in breadcrumbs

    There’s another link to a site with source code which should work.

    On single event pages of The Events Calendar there’s only outputted “Untitled” as Breadcrumbs – i also tried this but it doesn’t work.

    Image: https://i.imgur.com/Uf6WuXH.png

    If i add wp_reset_query(); in front of $this->do_post(get_post());, then the post is retrieved correctly, but i don’t know if this could break something?

    • This topic was modified 7 years, 5 months ago by fireemerald.
    • This topic was modified 7 years, 5 months ago by fireemerald.
    • This topic was modified 7 years, 5 months ago by fireemerald. Reason: Added image
    • This topic was modified 7 years, 5 months ago by fireemerald.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Havlik

    (@mtekk)

    If wp_reset_query() seems to work before the call to do_post(), then I’d try that before the call to bcn_display(). Note that calling wp_reset_query() within a loop will cause issues, hence something like this cannot be placed within the plugin.

    Thread Starter fireemerald

    (@fireemerald)

    Would be good if you could take a look what’s the main reason for this issue is and solve it by default… i posted you the debug screenshot what comes back from get_post();. The plugin is free for everyone in the basic version which is used.

    • This reply was modified 7 years, 5 months ago by fireemerald.
    • This reply was modified 7 years, 5 months ago by fireemerald.
    • This reply was modified 7 years, 5 months ago by fireemerald.
    Plugin Author John Havlik

    (@mtekk)

    I need to get The Events Calendar installed again on my testbed to look at this again. However, if I remember correctly from how this worked the last time I checked, The Events Calendar uses a secondary loop which affects the WP_Query instance and throws Breadcrumb NavXT off. Many cases of secondary loops, which modify the main $post and $wp_query global variables will cause this issue.

    Thread Starter fireemerald

    (@fireemerald)

    I took a closer look at the code. There are two different kinds of views, the overview (as month, list or day) and a single event.

    For the overviews (month, list or day) i found a filter which transformed the title of the breadcrumb into “false”. So adding the following filter to your functions.php file restores the correct label name:

    // Custom filter to retrieve the correct name of the events calendar month view
    function tribe_post_type_archive_title( $object_labels_name, $object_name ) {
    
        // Set the title to the correct post type name
        if ( is_post_type_archive('tribe_events' )) {
            $post_type_obj = get_post_type_object( $object_name );
            return $post_type_obj->labels->name;
        }
        return $object_labels_name;
    }
    // Priority must be greater 10 (default)
    add_filter( 'post_type_archive_title', 'tribe_post_type_archive_title', 20, 2 );

    Now i will take a look at the single events…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support for the events calendar’ is closed to new replies.