I've made a website and integrated wordpress. But when I click a link from wordpress it opens in a new windows.

It is probably because they are dynamic links but I would love to know how I can open them in on the same page.

My website is: http://www.volunteeringnews.com

If you click a link on the right side (say category) it opens a new website but it has to stay on the current one and open in the main section.

I hope someone can help me out here because I've been having this problem for a while now.

1 Answer 1


I have copied the generated code from your website. The new window happens because of the target="_blank" in the anchor a tag. If you can check the widget code/settings you would know if you need to change PHP code or is configurable.

<div class="socialmedia-buttons smw_left">
<a href="https://www.facebook.com/pages/Volunteering-News/391260697641619" rel="nofollow" target="_blank">
<img width="32" height="32" src="http://www.volunteeringnews.com/wordpress/wp-content/plugins/social-media-widget/images/cutout/32/facebook.png" alt="Follow Us on Facebook" title="Follow Us on Facebook" style="opacity: 0.8; -moz-opacity: 0.8;" class="fade">
<a href="https://plus.google.com/u/0/b/107875899230242366723/107875899230242366723/posts" rel="publisher" target="_blank">
<img width="32" height="32" src="http://www.volunteeringnews.com/wordpress/wp-content/plugins/social-media-widget/images/cutout/32/googleplus.png" alt="Follow Us on Google+" title="Follow Us on Google+" style="opacity: 0.8; -moz-opacity: 0.8;" class="fade">
<a href="https://twitter.com/volunteeringnew" rel="nofollow" target="_blank">
<img width="32" height="32" src="http://www.volunteeringnews.com/wordpress/wp-content/plugins/social-media-widget/images/cutout/32/twitter.png" alt="Follow Us on Twitter" title="Follow Us on Twitter" style="opacity: 0.8; -moz-opacity: 0.8;" class="fade">

EDIT: As per the widget's page you can configure it under widget settings. It can be found usually under appearance->widgets.

  • Thank you very much for you answer. I can see where you coming from but it is not the social media part that I am talking about. If you go to comments for example and you click it, it will guide you to this link: <a href="volunteeringnews.com/wordpress/?p=1#comment-1">Hello world!</a>. My goal is that the link wordpress creates will open on my website and not on its own. Thank you again. Commented Sep 9, 2013 at 18:00
  • @RoaldVanDerTempel Are you asking the specific division to expand in it's specific place and then display all the content in the same place without going to a new page at all?
    – Srihari
    Commented Sep 10, 2013 at 13:46
  • Yes, if you go to any of the menu items, it will open in the middle of the page without refreshing a new page. I want wordpress to do the same. I want it to load inside of my main page. Commented Sep 10, 2013 at 14:05
  • @RoaldVanDerTempel - Try this plugin
    – Srihari
    Commented Sep 10, 2013 at 14:18
  • @ Srihari, Thank you for the tip but that wasn't really what I wanted to do. What I want to do is very simple. If you go to volunteeringnews.com you can see my blog in the mainC2 div. If you click on "Leave a reply" it will direct you to :volunteeringnews.com/wordpress/?p=20#respond . But it should just open in my mainC2 div without changing the link. I have tried your ajax option and it works, but only on the wordpress site and not my site. I also tried adding the base code to head and making links relative but I can't figure it out. Commented Sep 13, 2013 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.