Title: changing &#8220;target&#8221; attribute
Last modified: April 22, 2018

---

# changing “target” attribute

 *  Resolved [kawus87](https://wordpress.org/support/users/kawus87/)
 * (@kawus87)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/)
 * Hi,
 * My site: uwodzicielski.pl
    Theme: Kadence Virtue
 * Question:
    I want to change target attribute for my products on homepage. Currently
   is “_blank” (by clicking on product image and product title; button below works
   fine). How to change it to target=”_self”? Which file should I edit?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchanging-target-attribute%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/#post-10210485)
 * Hi [@kawus87](https://wordpress.org/support/users/kawus87/),
    This link should
   target self by default. See here: [http://themes.kadencethemes.com/virtue/shop/](http://themes.kadencethemes.com/virtue/shop/)
   Have you added anything to the theme that would affect this?
 * Hannah
 *  Thread Starter [kawus87](https://wordpress.org/support/users/kawus87/)
 * (@kawus87)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/#post-10222046)
 * Hi [@hannahritner](https://wordpress.org/support/users/hannahritner/), thanks
   for your reply.
 * I think I haven’t. There is target=”_blank” on my website since I remember. I
   only changed product button below the title (originally there was a direct link
   to external affiliate page), but it does not affect the picture and the title.
   When I restore the original settings (and remove my dedicated function), the 
   problem remains.
 * The other thing is that my Virtue theme is not up-to-date. Can it be a reason?
   Was there another default target attribute in the previous versions of the theme?
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/#post-10222089)
 * Ok, before we try anything else please bring your theme up to date. That in itself
   may solve the issue. Also, ensure all your plugins have been updated and you’re
   running the latest version of WordPress.
 * Hannah
 *  Thread Starter [kawus87](https://wordpress.org/support/users/kawus87/)
 * (@kawus87)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/#post-10238931)
 * Hi,
 * the problem was solved by editing content-product.php file (path: /wp-content/
   themes/virtue/woocommerce/content-product.php). Thanks for all replies 🙂
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/#post-10239272)
 * Glad to hear it!
 * Hannah

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘changing “target” attribute’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/virtue/3.4.15/screenshot.png)
 * Virtue
 * [Support Threads](https://wordpress.org/support/theme/virtue/)
 * [Active Topics](https://wordpress.org/support/theme/virtue/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/virtue/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/virtue/reviews/)

## Tags

 * [kadence themes](https://wordpress.org/support/topic-tag/kadence-themes/)

 * 5 replies
 * 2 participants
 * Last reply from: [hannah](https://wordpress.org/support/users/hannahritner/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/changing-target-attribute/#post-10239272)
 * Status: resolved