Viewing 15 replies - 1 through 15 (of 34 total)
  • Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    I’m assuming this is done via events.php w/in plugins/events-manager/templates/tables/, however I’m just not sure how to get it to work (I can add in the name by
    <th><?php _e ( ‘Category’, ‘dbem’ ); ?></th>

    … Just not sure how to pull in the actual event category. #noob.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you might need additional coding and hacking into the code to do this; eg. please see classes/em-event-posts-admin.php

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    Any chance to point me in the right direction for coding? I am not a coder at all ??

    Thanks for any help you can provide!

    Plugin Support angelo_nwl

    (@angelo_nwl)

    we can give tips but am afraid that we cannot give a step by step guide and since you are not a coder maybe you can have a developers assistance to make this work

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    I’ll take any additional tips you can provide. I’ve built the intranet for our company using wordpress and modified a bunch of other plugins to make it function as needed. While not a coder, I’m still a resourceful IT guy and usually good at figuring things out.

    You can use a standard WordPress function to the get category of the events:
    https://codex.www.ads-software.com/Function_Reference/get_the_category

    You’d need to use event-categories as the taxonomy. The function can be run from the template you’re editing.

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    Hmm I guess I’m not understanding how to get this to work. Everything I enter either pulls in “array”, it’s blank, or I get error.. ??

    I was thinking it was something like this, but I can tell it’s wrong (since it doesn’t do anything, lol)

    <?php
    $category = get_the_category();
    echo $category[0]->event_categories;
    ?>

    I really need categories to display in the table, so I’m hoping I can figure it out.

    [Moderator Note: No bumping, thank you.]

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    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.

    Sorry, I don’t have the option to mark posts as resolved or unresolved.

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    Okay thanks! Guess it’s time to hire a developer.

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    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?

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    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); ?>
    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    This returns int(0)

    <?php global $post; $categories = get_the_category($post->ID); var_dump($event-categories); ?>

    View post on imgur.com

    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?

    View post on imgur.com

    Thread Starter gunbunnysoulja

    (@gunbunnysoulja)

    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-categories

    I 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 0

    using event manager from the front end when I click on a category it shows “Page Not Found” Please someone help me! I’ve spent hours trying to figure this out. Please help!!!

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Edit Events Page show Category’ is closed to new replies.