[Plugin: Our Team] Modify template child theme
-
Hi All
I am using this Plugin and have worked out where I need to add target=_”blank” to the template (see last line of code below) to get the url to pen in a new window. However I know this will be lost if this Plugin is updated. I have a child theme and would like to add a filter in the functions.php instead to achieve the same objective, but this is beyond my current coding experience.
Any advice much appreciated.
// Begin templating logic. $tpl = '<div itemscope itemtype="https://schema.org/Person" class="%%CLASS%%">%%AVATAR%% %%TITLE%% <div id="team-member-%%ID%%" class="team-member-text" itemprop="description">%%TEXT%% %%AUTHOR%%</div></div>'; $tpl = apply_filters( 'woothemes_our_team_item_template', $tpl, $args ); $count = 0; foreach ( $query as $post ) { $count++; $template = $tpl; $css_class = apply_filters( 'woothemes_our_team_member_class', $css_class = 'team-member' ); if ( ( is_numeric( $args['per_row'] ) && ( 0 == ( $count - 1 ) % $args['per_row'] ) ) || 1 == $count ) { $css_class .= ' first'; } if ( ( is_numeric( $args['per_row'] ) && ( 0 == $count % $args['per_row'] ) ) ) { $css_class .= ' last'; } // Add a CSS class if no image is available. if ( isset( $post->image ) && ( '' == $post->image ) ) { $css_class .= ' no-image'; } setup_postdata( $post ); $title = ''; $title_name = ''; // If we need to display the title, get the data - JOHNNYM added to line 115 target=_blank if ( ( get_the_title( $post ) != '' ) && true == $args['display_author'] ) { $title .= '<h3 itemprop="name" class="member">'; if ( true == $args['display_url'] && '' != $post->url && apply_filters( 'woothemes_our_team_member_url', true ) ) { $title .= '<a href="' . esc_url( $post->url ) . '" target="_blank">' . "\n"; }
- The topic ‘[Plugin: Our Team] Modify template child theme’ is closed to new replies.