I’ve set up the TagDiv block widget to appear in the right column of WooCommerce products’ pages. I’ve set them to display specific posts. The problem is, how do I set these up to launch new tabs? I don’t want the customer to leave the product page, not only because the breadcrumbs are not relevant to the product page at all.
https://cet.pairsite.com/product/smart-lamp-dawn-simulator/
As you can see, the right column contains a block, titled “Why Buy This Product?”, and it contains specific posts pertaining to that given product. It’s accomplished by dropping a Block 9 into a widget. I then map the posts to the block, and map the widget to the product.
The issue is that yes, the target=“blank” property isn’t set, so the customer actually leaves the product page in the current browser.
Hello cantonjester,
I have checked your shop page and I saw that when you click the button Buy on Amazon, you will directly redirect to the Amazon in another tab, like this -> https://www.screencast.com/t/eyF1ebtz0eE
Thanks for the message!
I’m not talking about the “Buy on Amazon” button.
I’m talking about the links in the right column as I said yesterday. They need to open in a new browser tab so that the customer doesn’t technically leave the product page.
Do you understand what I’m saying?
Keith
Hello cantonjester,
You should add the target=”_blank” property and add for each module title according to the following screenshot here -> https://www.screencast.com/t/rdYcaX6MYAqt
Thanks for the message!
But won’t that affect all modules on pages throughout the website? I need to be able to apply the target=“_blank” property locally, rather than globally so that I can limit its use to the WooCommerce product pages.
Keith
Could I be able to apply the target=“_blank” property limited only to a particular Block type? Or perhaps where I define categories for posts?
At any rate If I’m going to be making changes to the code, I’d need to be able to apply any changes to the child theme’s functions.php anyway to avoid losing any changes made with future theme updates, right?
-
This reply was modified 8 years by
cantonjester.
-
This reply was modified 8 years by
cantonjester.
Hello cantonjester,
Please notice that task involves Woocommerce additional customizations and we cannot provide something like this because it’s custom work and we cannot do this at the moment, sorry! You should try finding online such advice in this case. As a hint, please refer to the following topics from here -> https://stackoverflow.com/questions/35237487/open-woocommerce-external-products-in-new-tab -> https://wordpress.org/plugins/wc-external-product-new-tab/
Hope this helps!
Thanks for your understanding!