Afternoon all,
I would like to be able when i go to site/people-type/type-name(where type-name is my people type) be able to display the type name and the type description and then display all the people assigned to that people-type.
Ive gotten the people in that group to be displayed but I cant seem to find where the people type name and description are stored.
Any help would be appreciated.
Hi Seth,
I had the same idea. I used Tony’s advice from another ticket by using Kint Debugger with d ($people_obj) where $people_obj is set as $people_obj = $post->EE_Person; and I set this in my child theme in the file content-espresso_details.php. When I look at Kint debugger and the methods therein there is no mention of description or people-type-category
So to be clear, have you created a custom template to display the people details or are you just using the standard urls to list the people from a type?
/people-type/ is the re-write rule for the espresso_people_type taxonomy.
/type-name/ will be the term within that taxonomy.
So when you navigate to /people-type/type-name/ your viewing all posts that have been assigned the ‘type-name’ term from the espresso_people_type custom taxonomy.
Unless you want to display the term description for each individual person within the list, you can’t use the EE_Person object as that’s for the posts within the loop, not the current output.
thanks tony. Yes im using the people-type as the navigator. so when i navigate to /people-type/type-name i want to view all the people assigned to that type. However I want to display the type-name and the type-description at the top of the page. It is asking to the image I showed you.
I did create a custom template in my child theme archive-espresso_people.php and in there get_template_part( ‘content’, get_post_type() ); i then created a content-espresso_people.php with this code therein
<?php
$people_obj = $post->EE_Person;
d($people_obj);
?>
<div class=”staff-info”>
<div class=”staff-image”>
<?php if ( has_post_thumbnail() ) : ?> ” title=”<?php the_title_attribute(); ?>”>
“/>
content-espresso_people.php is used for the loop right? Meaning its too late to use that to display the description just one within that.
So as you know, the taxonomy is using the archive template, so its basically an archive, archive-espresso_people.php is where you want to add the additional details, at the top of the page.
If we take a look at how twentyfifteen does this (which is what I used for my screenshot) you’ll find the archive.php template has this:
Thanks a million Tony – that’s the trick.
For others who may want to do achieve the same goal:
I placed it in my child theme’s archive-espresso_people.php file before the loop
<header class=”page-header”>
<?php
the_archive_title( ‘<h1 class=”page-title”>’, ‘</h1>’ );
the_archive_description( ‘<div class=”taxonomy-description”>’, ‘</div>’ );
?>
Thanks for sharing Steph, I’m glad you got it working 🙂
Viewing 7 reply threads
The support post ‘EE – People Add On Display Description of Type’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.