Home › Forums › Calendar Products › Events Calendar PRO › Tag in Tag Cloud does not include the event.
- This topic has 11 replies, 2 voices, and was last updated 11 years, 1 month ago by Barry.
-
AuthorPosts
-
January 22, 2013 at 2:39 pm #31400Norine LeibelParticipant
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.January 23, 2013 at 8:03 am #31445BarryMemberI think you’re describing something quite different.
In your case, you’ve registered a new taxonomy to enable tags for events, is that correct?
January 23, 2013 at 8:38 am #31451Norine LeibelParticipantThanks, 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?January 23, 2013 at 10:27 am #31457BarryMemberThe 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?
January 23, 2013 at 10:50 am #31459Norine LeibelParticipantI 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.)
January 23, 2013 at 12:27 pm #31478BarryMemberYour’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!).
January 23, 2013 at 12:37 pm #31480Norine LeibelParticipantThanks, 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.January 24, 2013 at 8:28 am #31524Norine LeibelParticipantI 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!
January 24, 2013 at 2:51 pm #31549BarryMemberBut 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.
January 25, 2013 at 1:48 pm #31616Norine LeibelParticipantThanks, 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.
January 25, 2013 at 1:51 pm #31617BarryMemberRight – 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.
March 8, 2013 at 11:02 am #42018BarryMemberIt’s been a while so I will now close this thread 🙂
-
AuthorPosts
- The topic ‘Tag in Tag Cloud does not include the event.’ is closed to new replies.