Hi @elizajane,
Thank you for reaching out. How are you? ??
It’s a great thing that you already created a child theme.
In order to make this modification, it is required to add some JavaScript code.
Please use the following steps:
1. Create “js” folder inside the currently active Go Child Theme.
2. Create a “custom.js” file in the above-mentioned “js” folder.
3. Add the following JS code into the “custom.js” file:
window.onload = function(){
var anchors = document.getElementsByClassName('social-icons__icon');
for (var i=0; i<anchors.length; i++){
anchors[i].setAttribute('target', '_blank');
}
}
4. Add the following code at the bottom of the “functions.php” file in the folder of the currently active Go Child Theme:
function wpb_adding_scripts() {
wp_register_script('custom_js', get_stylesheet_directory_uri() . '/js/custom.js', array('jquery'),'1.1', true);
wp_enqueue_script('custom_js');
}
add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts', 999 );
Save all files and try clicking on the footer icons.
Let me know if this worked for you. ??
Best Regards,
Pavle
-
This reply was modified 4 years, 4 months ago by gdpavle.