• Resolved boca jo

    (@boca-jo)


    I need to display a public team page showing only first names and images. No last names. For privacy reasons, the last name may not even be in the page source, so it’s not enough to use CSS like .family_name { display: none; }.

    Is there a filter hook I can use to suppress the last name? If not, can you point me to documentation to modify the built-in team team template?

    Here’s a page from another site that I’m trying to mimic.

    Thanks in advance.

    • This topic was modified 3 years, 6 months ago by boca jo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    You’ll want to use one of the Grid Team Blocks. Here’s a page showing examples:

    I have not actually tested this, but you should be able to use a template override file (sort of like a child theme). Here’s a link to the developer doc:

    Which Grid Team Block you choose will determine the template slug. Here’s the list of slugs for each Team Grid Block:

    • block-team-grid-card-clean
    • block-team-grid-card-flip
    • block-team-grid-card-overlay
    • block-team-grid-card-slide

    All of these templates only have a card.php file that can be overridden. You will find the files in their respective subfolders:

    • ../wp-content/plugins/connections/templates/

    Look for this block of code in the template file:

    $entry->getNameBlock( array( 'link' => FALSE ) );

    Change it to:

    $entry->getNameBlock( array( 'link' => FALSE, 'format' => '%first%' ) );

    Save a copy of the card.php to the folder location outlined in the template override doc.

    I hope this helps!

    Thread Starter boca jo

    (@boca-jo)

    Thanks, Steven! That worked well. I also needed to scrub the last name from the page source, in particular the alt and title attributes of the img tags as well as the folder name for the individual’s images. The filters cn_photo_alt, cn_photo_title, and cn_entry_slug did the trick. Thank you for providing them!

    Jo

    • This reply was modified 3 years, 6 months ago by boca jo.
    Plugin Author Steven

    (@shazahm1hotmailcom)

    Great to hear you were able to get it sorted and use the many filters available in Connections to meet your needs!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Suppress last name on team page?’ is closed to new replies.