Title: Product link wrong while using plugin in subfolder WP installation
Last modified: April 13, 2021

---

# Product link wrong while using plugin in subfolder WP installation

 *  [manojmobo](https://wordpress.org/support/users/manojmobo/)
 * (@manojmobo)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/)
 * Hi, our WP is installed in a subfolder [https://glamdeva.com/shop/](https://glamdeva.com/shop/)
 * but the product details page links generated by WP-Shopify is not listening to
   the subfolder and creating links assuming WordPress is on the root.
 * Correct link of a product detail page – [https://glamdeva.com/shop/products/gx40](https://glamdeva.com/shop/products/gx40)
 * Wrong link generated by WP-Shopify – [https://glamdeva.com/products/gx40](https://glamdeva.com/products/gx40)
 * You can check all the product details page links here – [https://glamdeva.com/shop/products/](https://glamdeva.com/shop/products/)
 * Please help me resolve this.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproduct-link-wrong-while-using-plugin-in-subfolder-wp-installation%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * (@andrewmrobbins)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14313433)
 * [@manojmobo](https://wordpress.org/support/users/manojmobo/) Hey there,
 * Thanks for letting me know about this! As a quick workaround, you could add this
   hook to your theme’s JavaScript file:
 *     ```
       wp.hooks.addFilter('misc.link.href', 'wpshopify', function (defaultLink, type) {
          var split = defaultLink.split('https://glamdeva.com/');
          var newLink = 'https://glamdeva.com/shop/' + split[1];
   
          return newLink;
       });
       ```
   
 * For a more permanent solution, I’ll need to update the plugin. I’ve added it 
   to my things to do!
    -  This reply was modified 5 years, 1 month ago by [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/).
 *  Thread Starter [manojmobo](https://wordpress.org/support/users/manojmobo/)
 * (@manojmobo)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14313646)
 * Hello Andrew, thank you very much for your suggestion, we will try this, yes 
   it will be helpful for everyone if you add this option on the future release 
   🙂 Love your plugin 🙂
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585484)
 * Is there an update for this, perhaps if I enable beta versions? I added the JS
   but now it broke my product index (i’ve resynced etc)
 *  Plugin Author [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * (@andrewmrobbins)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585500)
 * [@mrpink84](https://wordpress.org/support/users/mrpink84/) Hey there,
 * Not yet, but I’m working on it. When you say it breaks your product index, can
   you elaborate? If you can send me a link to your page that would help too!
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585535)
 * Thanks for the fast reply! The product index page is [https://logicscdn.com/aesmexico/products/](https://logicscdn.com/aesmexico/products/)
   it looked good before but clicking the products broke so I found this snippet.
 * I added the snippet inline in javascript in the <head> and now nothing loads 
   on this page.
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585538)
 * I just noticed the shopping cart is thinking vs saying “0” like before so it 
   seems like it’s breaking the entire Shopify connection for some reason.
 * EDIT: Oh never mind now it says 0 in the shopping cart on the right it just took
   longer than expected.
    -  This reply was modified 4 years, 11 months ago by [WordPink](https://wordpress.org/support/users/mrpink84/).
 *  Plugin Author [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * (@andrewmrobbins)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585544)
 * [@mrpink84](https://wordpress.org/support/users/mrpink84/) Thanks for the update,
   I see what you mean.
 * Would you mind removing that code snippet again for me and letting me know so
   I can see it working now?
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585579)
 * Ok its removed.
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585583)
 * Oh I might have to resync it or something now? hmm.
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585590)
 * I just synced and cleared the cache and it’s still not showing up, with the snippet
   removed. Oh boy ok.
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585593)
 * The products, all 3000+ of them, are showing up in the Dashboard as well.
 *  Plugin Author [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * (@andrewmrobbins)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585602)
 * [@mrpink84](https://wordpress.org/support/users/mrpink84/)
 * Hmm, can you try temporarily disabling all your other plugins to see if that 
   fixes it? If that doesn’t work, I would try re-installing the plugin.
 *  [WordPink](https://wordpress.org/support/users/mrpink84/)
 * (@mrpink84)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585804)
 * I wasn’t using the Pro version before, and I think it may be fixed in the Pro
   version? I’m still having default products index page issues but the shortcodes
   are working now. Is there anyway you can delete my post with the URL or more 
   importantly just the URL? I thought I’d be able to edit it out later but I guess
   there’s a time limit on WP’s forum.

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

The topic ‘Product link wrong while using plugin in subfolder WP installation’ is
closed to new replies.

 * ![](https://ps.w.org/wpshopify/assets/icon.svg?rev=2740857)
 * [ShopWP](https://wordpress.org/plugins/wpshopify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpshopify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpshopify/)
 * [Active Topics](https://wordpress.org/support/plugin/wpshopify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpshopify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpshopify/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [WordPink](https://wordpress.org/support/users/mrpink84/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/product-link-wrong-while-using-plugin-in-subfolder-wp-installation/#post-14585804)
 * Status: not resolved