Posted: July 20, 2021 at 7:47 pm
Hello, I have searched these forums and can’t seem to find a conclusion on how to add the Event category and tags the events.
I figured out how to add the category description (without the category name), using this method: https://gist.github.com/joshfeck/2df649a11c8cda58e69d478a74873808
But in another thread, the question of how to add the actual category or tag name is not solved:
Can you help us get the code snippet we need to make both categories and tags appear, and not just their description?
We are using the Genesis framework, if that helps anything.
I think you are looking for something like this:
Within THIS condition, you have
Within THIS condition you have a EE_Term object in
Does that help?
Thank you Tony. However, while I can get by with code snippets and sometimes I can make out where to add a post ID or something like that, I’m not really a php coder. So what you explained after giving the link is beyond me. If I use the code in the link you gave, would that do the trick? Is there more I need to customize? Is that why you’re giving the extra info?
It just seems like it should be a fairly straightforward, simple thing, to add categories on a post in WordPress, including event posts. I’m not clear why this isn’t just built in to your plugin already. But a code snippet is fine with us, as long as it can be used without needing to become a php developer.
We really appreciate your help and prompt responsiveness though. We’ve got only good things to say about your company and level of support.
It all depends on how you want to output those details, the specifics of how, what and where you want to output the category/tag name, description etc changes what needs to be done.
The snippet as is will output something like: https://monosnap.com/file/qTfPalsv8IG64SEvQh45erIwlfFe7E
EE4 events are a custom post type, so a lot of the output, layout especially, is controlled by your site’s theme.
The tags applied are standard tags, if your theme outputs tags for posts it should also do so for EE4 events but it’s heavily reliant on the theme to do so by default. We’ve seen themes output specific details only for ‘posts’ and ‘pages’ which means they then exclude a lot of functionality from custom post types like EE events.
EE Categories are a little custom (they are a custom taxonomy), they won’t normally be output by default on most themes unless they handle custom taxonomies (some do). This was a design choice to keep EE categories separated from the default WordPress categories as it makes it easier to manage for you (the end user) but does mean to output them sometimes takes a little code.
We ‘could’ just inject all of the details everywhere but the problem is that the presentation layer is meant to be controlled by your theme, the more we step over that the more chance we have with conflicts (both EE and the theme outputting categories on the same page for example).
I do get your point, it is just a balancing act between overloading the page, dealing with potential conflicts and keeping the output ‘clean’.
If you let me now how you want to output the above details I may be able to tailor the snippet to your needs better.
Thank you for the feedback 🙂
Thank you Tony.
The way we want to output the categories and tags is at the bottom of the event post, like Genesis would do ‘normally.’
If there is a category, then the category would show up at the bottom.
The code I referenced is currently showing the category description at the bottom of event posts.
We would want that area to show the category and tag names as well, but above the description.
It may start with “Event categories:” / “Event tags:” or something like that (I could manage changing that in the code you may try to to give me, if I wanted to).
If there is a parent and child category it could show the path like a breadcrumb.
Parent category / child category.
And likewise with tags.
Does that sound reasonable? I’m not sure what else we need to describe but I’d be happy to give more details if need be.
Thank you again.
Genesis is a framework that outputs very little on it’s own, you’ll be running a theme on top of that framework. Looking at the site linked to your license it looks like you are using Agentpress Pro, can you send me a copy of that theme so I can see what it does?
Also, can you link me to a post that has the Category and Tag output you are looking for?
which email should I use to send it?
You can use support[at]eventespresso.com
If the file is larger than 10MB you may need to use a service such as WeTransfer (they host the .zip and an email is sent to the provided email to download).
I sent an email