Page 1 of 1

Open social link in external windows

Posted: February 2nd, 2017, 11:05 pm
by mendy123z
How can i di the social link in the tema member open in a diferent windows when the people click it.

Re: Open social link in external windows

Posted: February 3rd, 2017, 11:14 am
by support_staff
social link open in new tab of team member done

Re: Open social link in external windows

Posted: February 3rd, 2017, 6:20 pm
by mendy123z
Excelent, but i wanted to know how did you do?
support_staff wrote:social link open in new tab of team member done

Re: Open social link in external windows

Posted: February 4th, 2017, 10:27 am
by support_staff
home-team1.php file in child theme

in the following code

Code: Select all

<ul class="social">
						<?php if(get_post_meta( get_the_ID(),'fb_link', true )!=""){ ?>
							<li class="facebook"><a href="<?php echo get_post_meta( get_the_ID(),'fb_link', true ); ?>" target="_blank"><i class="fa fa-facebook icon"></i></a></li>
						<?php } if(get_post_meta( get_the_ID(),'gp_link', true )!=""){ ?>
							<li class="googleplus"><a href="<?php echo get_post_meta( get_the_ID(),'gp_link', true ); ?>" target="_blank"><i class="fa fa-google-plus icon"></i></a></li>
							<?php } if(get_post_meta( get_the_ID(),'tw_link', true )!=""){ ?>
							<li class="twitter"><a href="<?php echo get_post_meta( get_the_ID(),'tw_link', true ); ?>" target="_blank"><i class="fa fa-twitter icon"></i></a></li>
							<?php } if(get_post_meta( get_the_ID(),'li_link', true )!=""){ ?>
							<li class="linkedin" ><a href="<?php echo get_post_meta( get_the_ID(),'li_link', true ); ?>" target="_blank"><i class="fa fa-linkedin icon"></i></a></li>
							<?php } ?>
						</ul>
we add code

Code: Select all

target="_blank"

Re: Open social link in external windows

Posted: February 9th, 2017, 6:23 am
by mendy123z
thank you
support_staff wrote:home-team1.php file in child theme

in the following code

Code: Select all

<ul class="social">
						<?php if(get_post_meta( get_the_ID(),'fb_link', true )!=""){ ?>
							<li class="facebook"><a href="<?php echo get_post_meta( get_the_ID(),'fb_link', true ); ?>" target="_blank"><i class="fa fa-facebook icon"></i></a></li>
						<?php } if(get_post_meta( get_the_ID(),'gp_link', true )!=""){ ?>
							<li class="googleplus"><a href="<?php echo get_post_meta( get_the_ID(),'gp_link', true ); ?>" target="_blank"><i class="fa fa-google-plus icon"></i></a></li>
							<?php } if(get_post_meta( get_the_ID(),'tw_link', true )!=""){ ?>
							<li class="twitter"><a href="<?php echo get_post_meta( get_the_ID(),'tw_link', true ); ?>" target="_blank"><i class="fa fa-twitter icon"></i></a></li>
							<?php } if(get_post_meta( get_the_ID(),'li_link', true )!=""){ ?>
							<li class="linkedin" ><a href="<?php echo get_post_meta( get_the_ID(),'li_link', true ); ?>" target="_blank"><i class="fa fa-linkedin icon"></i></a></li>
							<?php } ?>
						</ul>
we add code

Code: Select all

target="_blank"

Re: Open social link in external windows

Posted: February 9th, 2017, 10:13 am
by support_staff
Most welcome