We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Good morning,
I was trying to display contact_email with a custom template such as:
add_filter( 'woothemes_our_team_item_template', 'new_team_member_template' ); function new_team_member_template( $tpl ) { $tpl = '<li itemscope itemtype="http://schema.org/Person" class="%%CLASS%%">%%AVATAR%% %%TITLE%% %%CONTACT_EMAIL%% <div id="team-member-%%ID%%" class="team-member-view-more" itemprop="description"><a href="%%PROFILE_URL%%" class="readProfile">Read more</a><div class="team-member-text">%%TEXT%%</div></div></li>'; return $tpl; }
But CONTACT_EMAIL didn't work
CONTACT_EMAIL
So I tried to find out what was going wrong, and made the following change in whoothemes-our-team-template.php
whoothemes-our-team-template.php
line 174 I saw this:
if ( true == $args['contact_email'] && '' != $post->contact_email && apply_filters( 'woothemes_our_team_member_contact_email', true ) ) { $member_fields .= '<li class="our-team-contact-email" itemprop="email"><a href="mailto:' . esc_html( $post->contact_email ) . '">' . __( 'Email ', 'our-team-by-woothemes' ) . get_the_title() . '</a></li>'; }
and changed it to this:
if ( true == $args['contact_email'] && '' != $post->contact_email && apply_filters( 'woothemes_our_team_member_contact_email', true ) ) { $member_fields .= '<li class="our-team-contact-email" itemprop="email"><a href="mailto:' . esc_html( $post->contact_email ) . '">' . __( 'Email ', 'our-team-by-woothemes' ) . get_the_title() . '</a></li>'; $template = str_replace( '%%CONTACT_EMAIL%%', '<a href="mailto:'.esc_html( $post->contact_email ).'">'.esc_html( $post->contact_email ).'</a>', $template ); }
Now I can retrieve contact_email on my template, Is this the right way to change it or should it not be wrap around that if condition?
contact_email
if
If this is ok is it worth to push these changes?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Good morning,
I was trying to display contact_email with a custom template such as:
But
CONTACT_EMAIL
didn't workSo I tried to find out what was going wrong, and made the following change in
whoothemes-our-team-template.php
line 174 I saw this:
and changed it to this:
Now I can retrieve
contact_email
on my template, Is this the right way to change it or should it not be wrap around thatif
condition?If this is ok is it worth to push these changes?
The text was updated successfully, but these errors were encountered: