amylong7
asked 10 years ago

Using the DW One Page template, how do you get your social icons (at the very bottom of the screen) to open in a new page? In regular old HTML, it’s just target=”_blank” but there is no way to edit that here. 

Thank you!

2 Answers
DominicStaff
answered 10 years ago

Hi Amylong !

To open social icon in a new page on the DW Page, You can open the shortcode.php file in the folder path “\wp-content\themes\dw-page-modern\inc”, find the from  line 575 to line 591.
See the screenshot:    Hope this helps!

amylong7
replied 10 years ago

Hi Dominic,

The theme-footer.php file in the inc folder only has 15 lines in total. ??? Not sure what you mean with lines 10 – 24?

Dominic Staff
replied 10 years ago

You can open the shortcode.php file in the folder path “\wp-content\themes\dw-page-modern\inc”, find the from line 575 to line 591.

amylong7
replied 10 years ago

Thanks Dominic. It looks like lines 575-591 are exactly the same as your screenshot up there. What do I need to edit to the code so clicking on the icons lead to a new page?

I attempted adding the “target= “_blank”‘ to the , but then that makes the icon non-clickable.

Your guidance is greatly appreciated!

amylong7
replied 10 years ago

Is there something you can do in the Custom Code of the appearance section under the “Footer”?

amylong7
replied 10 years ago

Just following up on this. How do I get my social icons in the footer section of the website to open in a new tab? Thank you!

DominicStaff
answered 10 years ago

Hi Amylong !
Apologies for the delay in replying to you. To resolve this issue, you can open the customizer.php file in the folder path “\wp-content\themes\dw-page-modern\inc\customizer”. Find the line 360 to line 364.
Replace the following code:

  <?php if($social_links['facebook']!='') { ?><li class="social facebook"><a href="<?php echo $social_links['facebook']; ?>"><i class="fa fa-facebook"></i></a></li><?php } ?>
    <?php if($social_links['twitter']!='') { ?><li class="social twitter"><a href="<?php echo $social_links['twitter']; ?>"><i class="fa fa-twitter"></i></a></li><?php } ?>
    <?php if($social_links['google_plus']!='') { ?><li class="social google_plus"><a href="<?php echo $social_links['google_plus']; ?>"><i class="fa fa-google-plus"></i></a></li><?php } ?>
    <?php if($social_links['youtube']!='') { ?><li class="social youtube"><a href="<?php echo $social_links['youtube']; ?>"><i class="fa fa-youtube"></i></a></li><?php } ?>
    <?php if($social_links['linkedin']!='') { ?><li class="social linkedin"><a href="<?php echo $social_links['linkedin']; ?>"><i class="fa fa-linkedin"></i></a></li><?php } ?>

With new Code:

 <?php if($social_links['facebook']!='') { ?><li class="social facebook"><a href="<?php echo $social_links['facebook']; ?>" target="_blank"><i class="fa fa-facebook"></i></a></li><?php } ?>
    <?php if($social_links['twitter']!='') { ?><li class="social twitter"><a href="<?php echo $social_links['twitter']; ?>" target="_blank"><i class="fa fa-twitter"></i></a></li><?php } ?>
    <?php if($social_links['google_plus']!='') { ?><li class="social google_plus"><a href="<?php echo $social_links['google_plus']; ?>" target="_blank"><i class="fa fa-google-plus"></i></a></li><?php } ?>
    <?php if($social_links['youtube']!='') { ?><li class="social youtube"><a href="<?php echo $social_links['youtube']; ?>" target="_blank"><i class="fa fa-youtube"></i></a></li><?php } ?>
    <?php if($social_links['linkedin']!='') { ?><li class="social linkedin"><a href="<?php echo $social_links['linkedin']; ?>" target="_blank"><i class="fa fa-linkedin"></i></a></li><?php } ?>

Hope this helps !
 

Powered by DW Question & Answer Pro