Keep in Touch

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27151
    Ann Zumwinkle
    Participant

    We are using the Staff Profiles feature of the Invent theme, and, believe it or not, many of the our staff do not use social media, so their “Keep in Touch” sections are empty. Is there an easy way to have that not show up on their page if there is nothing entered, and to show up if there is something entered. Right now, Keep in touch shows up whether or not anything is there. Thanks for your help.

    #27152
    Veena
    Moderator

    You can hide the string using below custom CSS –

    .postid-12038.single-staff .socials .subheading {
        display: none;
    }
    

    You need to provide the correct postid instead of 12038 .

    http://www.wpbeginner.com/beginners-guide/how-to-find-post-category-tag-comments-or-user-id-in-wordpress/

    #27165
    Ann Zumwinkle
    Participant

    We need something automated, perhaps and if/then statement. We have too many staff members that will need this done, and editors won’t be savvy enough for the manual fix.

    #27167
    Veena
    Moderator

    Pls modify file single-staff.php line no: 139 from

    
    echo '<h5 class="subheading">' . __('Stay in Touch', 'mo_theme') . '</h5>';
    

    to

    
    if (!empty($twitter) || !empty($googleplus) || !empty($linkedin) || !empty($facebook) || !empty($dribble) || !empty($instagram)){
       echo '<h5 class="subheading">' . __('Stay in Touch', 'mo_theme') . '</h5>';
    }
    

    Pls use child theme to preserve your changes while updating theme, you can copy the changes to your child theme.
    Child theme is included in the downloaded theme bundle.

    #27197
    Ann Zumwinkle
    Participant

    Thank you! This seems to be working. Excellent!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Keep in Touch’ is closed to new replies.