gunbunnysoulja
Forum Replies Created
-
Thank you so much for the follow-up as I REALLY appreciate the help!
Should I just wrap that in php tags? Doing so gave me an error:
Warning: Invalid argument supplied for foreach() in wp-content/plugins/events-manager/templates/tables/events.php on line 117
<?php $terms = get_the_terms( $post->ID , 'event-categories' ); foreach ( $terms as $term ) { echo $term->name; } ?>
I was thinking it might be get_the_terms as my research led me that way. I even tried some get_the_terms code as well just for the fun of it! ??
@caimin_nwl, the function you mentioned I could run from inside the template I’m editing for get_the_category, do you think it should be something similar to the above? If it’s a simple tweak, I would REALLY REALLY appreciate it.
EM is 5.5.3.1 and FC is 0.8.4. No link unfortunately as it’s on a private site. Thanks!
Any idea why
<?php global $post; $categories = get_the_category($post->ID); var_dump($event-categories); ?>
pulls in int(0)?
@wardlacey, you will probably have better luck creating your own new post, so the admins can see it.
@angelo, it seems he is asking about the same request as me, ie. adding category to the front-end page that shows a users existing events.
It looks like that form is events-manager/templates/tables/events.php
I still however can’t figure out the php snippet to use to pull in the event-categories taxonomy, to show the corresponding event category.
Well I think I realized why it doesn’t show directly in the wp_em_events table of the database, as it shows up via wp_term_taxonomy. I will have to let my developer know as he assumed that was a red flag before.
These are my corresponding categories that I want to pull in. The term_id is the associated id of the category.
term_id 26 count 15 term_taxonomy_id 29 taxonomy event-categories
term_id 27 count 41 term_taxonomy_id 30 taxonomy event-categories
term_id 36 count 5 term_taxonomy_id 59 taxonomy event-categories
term_id 48 count 1 term_taxonomy_id 54 taxonomy event-categories
term_id 49 count 4 term_taxonomy_id 55 taxonomy event-categories
term_id 50 count 1 term_taxonomy_id 56 taxonomy event-categories
term_id 51 count 1 term_taxonomy_id 57 taxonomy event-categories
term_id 52 count 2 term_taxonomy_id 58 taxonomy event-categoriesI can then see the term_id associated with the category name in the wp_terms table:
The term_id is then associated with the name in the wp_terms table.
term_id name slug term_group
26 Sick Time sick-time 0This returns int(0)
<?php global $post; $categories = get_the_category($post->ID); var_dump($event-categories); ?>
Is the category identified as event_category_id in the db? Mine said NULL for everything. The developer changed it to bigint(20) unsigned, which shows everything as 0. What should it be?
@smipweb, that is exactly what I have been trying to do for over two weeks now. I want/need the category to show on the front-end page. This is a link to my suppport post: https://www.ads-software.com/support/topic/edit-events-page-show-category?replies=13
I can get this to return array:
<?php $event_categories = get_the_category($post->ID); var_dump($event_categories); ?>
and this to return NULL:
<?php global $post; $categories = get_the_category($post->ID); var_dump($event_categories); ?>
I have a developers assistance with getting the associated category included in the table, and he mentioned the event categories section is failing to write to the database, all event_category_ID fields are null even with categories enabled in the plugin settings. Any thoughts?
Okay thanks! Guess it’s time to hire a developer.
Can you please unmark this as resolved? I understand admins can’t do a step-by-step, but a fellow user may want to assist.
Yes this is all set. When you use the HTTPS plugin, it will remove the jquery css theme setting so in case others have this issue, you will need to change it back after. I assumed it was broken when it was a simple setting change afterwards.
Apparently it was just due to the WP FullCalendar jquery CSS theme getting reset to no theme after switching to https.