Support

Home Forums Event Espresso Premium Wrapping Manager Role

Wrapping Manager Role

Posted: October 18, 2014 at 11:01 am

Viewing 6 reply threads


Spen

October 18, 2014 at 11:01 am

Hello there,

How would I wrap the manager role in it’s own tag? At the moment it appears within the manager’s name tag.

Cheers,

Spencer


Tony

  • Support Staff

October 20, 2014 at 4:33 am

Hi Spencer,

Can you explain this a little further please?

Which page/section are you referring to?


Spen

October 20, 2014 at 6:40 am

At the moment, the manager role is printed within the same <p> as the manager name:

<p class=”event_person”><strong class=”person_name”>Jessica Dalka – Event Coordinator</p>

I want to remove the role from this and wrap it in it’s own html.

Cheers Tony,

Spencer


Spen

October 20, 2014 at 9:45 am

Hi Tony,

I have a list of managers on this page: http://mixnmingle.com/event-managers

If you look at the second entry in the left column, the role is displayed in side the same <p> as the manager’s name.

Cheers,

Spencer


Tony

  • Support Staff

October 20, 2014 at 10:12 am

Looks like you are using the ESPRESSO_STAFF shortcode.

In that case you would need to modify the function used for that output. The function is pluggable so the best way to do this is to open up \event-espresso\includes\shortcodes.php

Copy the function from line 505 to 630.

Create a new file called custom_functions.php, open a php tag:

Then place that function in there.

You’ll want to edit the line:

$person_title = isset($person_role) && !empty($person_role) ? ' - ' . stripslashes_deep($person_role) : '';

Wrap the $person_role within a html element, such as a span, like so:

$person_title = isset($person_role) && !empty($person_role) ? ' - ' . '' . stripslashes_deep($person_role) . '' : '';

place that custom_functions.php file within /wp-content/uploads/espresso/ and EE will then use that function in place of the original. (If you already have a custom_functions.php file there, just add the function to the end of that file.


Spen

October 20, 2014 at 10:46 am

Hi Tony,

Thanks, that works perfectly.

Spencer


Tony

  • Support Staff

October 20, 2014 at 11:37 am

No problem 🙂

I’ll mark this thread resolved.

Viewing 6 reply threads

The support post ‘Wrapping Manager Role’ 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