Tag in Tag Cloud does not include the event.

Home Forums Calendar Products Events Calendar PRO Tag in Tag Cloud does not include the event.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #31400
    Norine Leibel
    Participant

    I’m wondering if my problem has the same cause as Elizabeth’s here: https://theeventscalendar.com/support/forums/topic/events-calendar-pro-still-causing-probs-with-tag-cloud-url/
    I’ve registered the tag taxonomy and seems to work fine when adding events, but when I go to the tag in the tag cloud, it’s not listed will all the other (regular) posts tagged the same. Is this related to the above issue, which means that it will be fixed in the next release, or is it something else entirely? Thanks.

    #31445
    Barry
    Member

    I think you’re describing something quite different.

    In your case, you’ve registered a new taxonomy to enable tags for events, is that correct?

    #31451
    Norine Leibel
    Participant

    Thanks, Barry. Yes, I’ve registered the taxonomy using the code obtained through commenters here: https://theeventscalendar.com/integrating-wordpress-categories-tags-with-your-events/

    `// Registers core WordPress category and taxonomy taxonomies on the “Events” post type registered by the plugin “The Events Calendar”
    add_action( ‘init’, ‘ac_add_calendar_taxonomy’, 20 );
    function ac_add_calendar_taxonomy() {
    register_taxonomy_for_object_type(‘category’, ‘tribe_events’);
    register_taxonomy_for_object_type(‘post_tag’, ‘tribe_events’);
    }`
    Is there something else I need to add?

    #31457
    Barry
    Member

    The problem there is that the tag query is set up to look for posts with that tag, not tribe_events with that tag. What you want to do of course is make it so WordPress queries for posts or tribe_events (or possibly any post type) that has been tagged.

    Have you posted back a comment of your own to ask whomever contributed the above code how they handled this?

    #31459
    Norine Leibel
    Participant

    I believe the comments are closed on the link I provided, which is why I have posted it in the forums. (I also thought it was related to Elizabeth’s problem, which we now know it isn’t.)

    #31478
    Barry
    Member

    Your’re quite right, I didn’t notice that. You’ll almost certainly need to modify the where component of the query, though … if you can bear with me I’ll see if I can hunt down a snippet for this (no guarantees though!).

    #31480
    Norine Leibel
    Participant

    Thanks, Barry, that would be wonderful. I’m feeling a little out of my element here.
    Not sure if makes any difference, but for context at the very least, I’m using a child theme of the Thematic framework.

    #31524
    Norine Leibel
    Participant

    I have found a partial solution which leads to another problem. I added the code from the FAQs, so total event tag related code is as follows:
    // Registers core WordPress category and taxonomy taxonomies on the “Events” post type registered by the plugin “The Events Calendar”
    add_action( ‘init’, ‘ac_add_calendar_taxonomy’, 20 );
    function ac_add_calendar_taxonomy() {
    register_taxonomy_for_object_type(‘category’, ‘tribe_events’);
    register_taxonomy_for_object_type(‘post_tag’, ‘tribe_events’);
    }
    // TO HAVE THE TAGS SHOW UP IN THE ARCHIVES.
    function include_in_tags( $query ) {
    if ( $query->is_tag ) {
    $query->set( ‘post_type’, array( ‘post’, ‘tribe_events’ ));
    }
    return $query;
    }
    add_filter( ‘pre_get_posts’, ‘include_in_tags’ );

    But the problem now is the whole event does not appear. No date, no venue, location, etc, just the event name (linked) and the description that was entered. I’d like to have the whole thing show up, just like it does when it appears in the event category.

    Thanks for any help!

    #31549
    Barry
    Member

    But the problem now is the whole event does not appear. No date, no venue, location, etc, just the event name (linked) and the description that was entered.

    Right, I guess I’d expect that. If we put this in the context of the Twenty Twelve default theme, it’s still going to be the job of the content.php template to render the posts.

    That template doesn’t contain any of The Events Calendar’s template tags and possibly (not 100% on this) the relevant meta data containing event specific information anyway needs to be pre-loaded.

    This may be simpler than it sounds – I don’t know because I haven’t tried it – but in any case, customizing whichever part of your theme renders the posts (or overriding it) would be an avenue worth exploring here.

    #31616
    Norine Leibel
    Participant

    Thanks, Barry, this will require some study on my part. Ideally it should be the same/similar code/concept as what it produces for the event category.

    #31617
    Barry
    Member

    Right – I mean we can offer pointers but you’re really trying to do something that’s pretty specific (and isn’t something The Events Calendar was specifically designed to do, not that it is impossible or anything).

    So feel free to post back if there’s anything we – or other community members – might be able to direct you on, but yeah it’s going to be a problem that you’ll predominantly have to solve by yourself.

    #42018
    Barry
    Member

    It’s been a while so I will now close this thread 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Tag in Tag Cloud does not include the event.’ is closed to new replies.