Footer widget menu links


#1

On the test server version of ellenrobinson.com/wordpress2, I’ve add a menu to the footer widget, with links to facebook and youtube. Is it possible to have these open in a new window/tab?


#2

Hello there,

Thank you for getting in touch.

I thought it’s possible to be achieved by adding custom jQuery code. We would use the .attr() method.

Could you please try to do the following?

  1. Install and activate the Header and Footer Scripts plugin
  2. Go to Settings > Header and Footer Scripts panel
  3. Paste the following code into the “Scripts in footer:”
<script>
jQuery(function($) {

  $('#sidebar-footer .menu a').attr('target', '_blank');

});
</script>
  1. Save settings

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Warmest regards,
Kharis


#3

Works great! Thank you.