Support » Plugin: Recent Posts Widget Extended » How to Remove ‘Permalink to’ Text?

  • Resolved mbmedia

    (@mbmedia)


    Hi,

    I would like to remove the “Permalink to” text when the mouse hovers over a clickable link in the widget area.

    Could someone please let me know how to remove it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yeah….I really like this plugin but this ‘Permalink to’ text is unnecessary and a bit odd.

    You’ll have to edit the plugin to get rid of this. Go to the plugin editor in WP, use the drop-down to select the plugin.

    Go to Includes > functions.php and on line 170, you’ll find this:

    $html .= '<h3 class="rpwe-title"><a href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'recent-posts-widget-extended' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark">' . esc_attr( get_the_title() ) . '</a></h3>';

    Delete 'Permalink to %s', so that you’re left with:

    $html .= '<h3 class="rpwe-title"><a href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'recent-posts-widget-extended' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark">' . esc_attr( get_the_title() ) . '</a></h3>';

    The ‘Permalink to’ text should now be no more. However, you will have to do this every time the plugin is updated unless the dev removes this permanently. AFAIK, it has no benefit (SEO or other) and isn’t needed.

    Hi, thanks for the details.

    I actually found another solution for it using a similar method with the ‘Real-Time Find and Replace’ plugin. I just pasted the text ‘Permalink to’ into the ‘Find’ area and left the ‘Replace’ area blank.

    No worries. Glad you found a solution that doesn’t involve editing the plugin each time it’s updated!

    palatin8

    (@palatin8)

    Delete 'Permalink to %s', so that you’re left with:

    $html .= '<h3 class="rpwe-title"><a href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'recent-posts-widget-extended' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark">' . esc_attr( get_the_title() ) . '</a></h3>';

    Function esc_attr__() expects two parameters, so don’t delete the single quotes. Leave at least an empty string '' or '%s'.

    • This reply was modified 1 year ago by palatin8.
    • This reply was modified 1 year ago by palatin8.
    • This reply was modified 1 year ago by palatin8.
    • This reply was modified 1 year ago by palatin8.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to Remove ‘Permalink to’ Text?’ is closed to new replies.