Remove "permalink to" text snippet that appears on hover with recent posts widget

can you tell me how to remove the “permalink to” text that appears on hover for the recent posts element? I previously used the code below, which no longer seems to be working:

jQuery(function($){
$(document).ready(function(){
$('a').attr('title','');
});
});

I can also see this js code is showing up in my footer, so something’s definitely changed in your later versions of the theme:

I also tried this code which was suggested in another thread:

jQuery(".blog .entry-featured a, .blog .entry-title a, .x-recent-posts a").removeAttr("title");

no luck.

someone else said this, and i’d also like to echo it: your typical website visitor is not familiar with what a “permalink” is - therefore, this is not good UX.

site: https://tinyurl.com/yd3knpxv

Hi there,

Adding this code to the Global JS should work:

jQuery('.x-recent-posts a').attr('title', '');

But as I have checked, you added a code to the Global JS that is not supposed to be there.

Please remove:

function my_custom_head_output() {
  ?>
   <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
  <?php
}

add_action( 'wp_head', 'my_custom_head_output', 99999 );

From the Global JS as that code is a PHP code and should go to the child theme’s functions;php file.

Hope this helps.

I’ve removed that code and placed into my functions.php in the child theme.

However, adding this still isn’t fixing the original issue:

jQuery('.x-recent-posts a').attr('title', '');

I’ve cleared cache in both browser and server side.

Hi there,

There is still a JS error caused by this line of code which is an HTML code:

<!-- Global site tag (gtag.js) - Google Analytics -->

Please only place Javascript codes in the Global JS to avoid errors.

Hope this helps.

I’ve removed that line in question as well as all other tags.

The issue now seems to be resolved. I used this:

jQuery('.x-recent-posts a').attr('title', '');

Thanks for helping out

Hi @COK,

Happy to hear that.

Feel free to ask us again.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.