Open social link in external windows

Ask Corporal Premium Theme Installation, Settings & Configuration, Problem, Error & Bug Related Issues Here

Moderator: forum_m

Post Reply
mendy123z
Posts: 39
Joined: December 10th, 2016, 11:02 pm

Open social link in external windows

Post by mendy123z » February 2nd, 2017, 11:05 pm

How can i di the social link in the tema member open in a diferent windows when the people click it.

support_staff
Posts: 7144
Joined: February 26th, 2015, 1:40 pm

Re: Open social link in external windows

Post by support_staff » February 3rd, 2017, 11:14 am

social link open in new tab of team member done

mendy123z
Posts: 39
Joined: December 10th, 2016, 11:02 pm

Re: Open social link in external windows

Post by mendy123z » February 3rd, 2017, 6:20 pm

Excelent, but i wanted to know how did you do?
support_staff wrote:social link open in new tab of team member done

support_staff
Posts: 7144
Joined: February 26th, 2015, 1:40 pm

Re: Open social link in external windows

Post by support_staff » February 4th, 2017, 10:27 am

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"

mendy123z
Posts: 39
Joined: December 10th, 2016, 11:02 pm

Re: Open social link in external windows

Post by mendy123z » February 9th, 2017, 6:23 am

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"

support_staff
Posts: 7144
Joined: February 26th, 2015, 1:40 pm

Re: Open social link in external windows

Post by support_staff » February 9th, 2017, 10:13 am

Most welcome

Post Reply

Return to “Theme Installation, Settings & Configuration, Problem, Error & Bug”