Ready to get started?Download WordPress


How to make recent posts widget links open in new window? (6 posts)

  1. lollacorn
    Posted 3 years ago #


    I have the Recent Posts widget active in the sidebar of my wordpress blog.

    However, I want any recent post links that are clicked to open in a NEW window as opposed to the same one.

    Can anyone please tell me how I can do this?

    Thanks :)

  2. Victor Petrescu
    Posted 3 years ago #

    It seems the widget doesn't have this option.
    You could find where the widget is coded into the PHP files and hardcode this attribute into the links:

  3. lollacorn
    Posted 3 years ago #

    Where is this widget code located? Is it /wp-includes/widgets.php or somewhere else?

    And how would I hardcode that attribute into it?

  4. lollacorn
    Posted 3 years ago #

    I checked the widgets.php file but I couldn't find a place to add a target="blank" command.

    Does anyone know how to do this?

  5. lollacorn
    Posted 3 years ago #

    I still can't figure this out. :(

    Does anyone know what to do?

  6. Blizzie
    Posted 2 years ago #

    put target="_blank" to the link tag..

Topic Closed

This topic has been closed to new replies.

About this Topic