Support

Home Forums Event Espresso Premium Show Speaker in Grid View?

Show Speaker in Grid View?

Posted: July 1, 2019 at 8:12 am

Viewing 4 reply threads


adasch

July 1, 2019 at 8:12 am

Hi!
I installed the Admin People Addon, added a person and assigned this person to an event.

Now I’d like to show the name of the speaker in my Grid View under the Event title. (How) is this possible?


And I just found a problem. After adding a person the automatically gererated link (https://example.com/people/firstname-lastname/) does not work. I get a 404 error…

THANKS for any help!


Tony

  • Support Staff

July 1, 2019 at 8:19 am

Hi there,

I’m assuming you’ve copied a version of the Grid template to your themes root directory and your customizing that version?

If you take a look at how the People add-on pulls the People objects for an evenr you can work from there.

Take a look in \eea-people-addon\public\templates\content-espresso_events-people.php

You’ll find something like:

$people = EEH_People_View::get_people_for_event();

Which is an array or ‘people’ and their ‘people type’ for the event, if you pass an event ID to the above function you’ll get people for that specific event.

And I just found a problem. After adding a person the automatically gererated link (https://example.com/people/firstname-lastname/) does not work. I get a 404 error…

You may need to flush your permalinks.

Go to Dashboard -> Settings -> Permalinks

You don’t need to do anything just load that page, now test the person’s page above, does it work?


adasch

July 2, 2019 at 7:50 am

Thanks Tony,
but I’m still kind of stuck as I’m not a very good programer :-/

What I did:
Within the grid template file I added two lines right after the line global $post;

EE_Registry::instance()->load_helper( 'People_View' );
$people = EEH_People_View::get_people_for_event();

With print_r ($people); I can see that my array is filled. But I can’t manage to get printed out just the full-name.

Can you give me a hand again?
thank you!


Tony

  • Support Staff

July 2, 2019 at 8:30 am

The code in the \eea-people-addon\public\templates\content-espresso_events-people.php template files shows you what you need to do with the array to pull the data you need.

Take a look at lines 26-49 and it shows you how to pull the individual person objects and then echo’s the full name.


adasch

July 2, 2019 at 9:21 am

Got it. Thanks for the “lesson” 🙂

Viewing 4 reply threads

The support post ‘Show Speaker in Grid View?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso