I'm stuck with this permalink structure in WordPress, I like to have some advice from the experts in the WordPress permalink area.
I'm building a website / shop with WordPress and Woocommerce. Both the latest versions.
If a leave the permalink structure default for the website and the shop all works fine.
But the default WordPress pages will have the link structure as:
http://www.myshop.com/?page_id=25
If I change the structure to /%postname%/ the website itself works great with page links like:
http://www.myshop.com/myinformationpage
But..
The Woocommerce part however is completely broken. The products page is ok with the overview of the first shop page but every product selection will end up in a 404 error.
This is also for category's, tags en even the shop cart payment pages.
What is the way to go here?
The best way for SEO is to change the basic permalink site setting to one of the none standaard settings. But what must be done to keep the WooCommerce shop working?
I don't want to remove the /shop/ or /products/ from the WooCommerce URL.
My settings:
Common Settings: /%postname%/
Optional: Product category base: ?product_cat= and Product tag base: ?product_tag=
Product permalink base: Custom base: /?product=
After a lot of trying i came up with the setting above. This will work for all WordPress content pages and most of the WooCommerce pages but the return after payment page is still broken.
Any input is welcome here.... thanks in advance!
After trying and changing the permalinks over and over again, removing the .htaccess and save the permalinks setting again, and all other tips ....
I finally found a post on wordpress.org. On the problem that the confirmation page that wat not found. (404)
[https://wordpress.org/support/topic/order-confirmation-page-not-found]
Adding this code to function.php did the trick.
function flush_rules(){
flush_rewrite_rules();
}
add_action('init','flush_rules');
Thanks helgatheviking for your responce!
Related
I'm new to woocommerce and I'm struggling to remove product-category from the category url.
I've read the solution provided on WooCommerce- How to remove product & product-category from urls? but I'm not sure if it still works.
Woocommerce shop entry page
https://floridapsychics.org/shop/
A product page, it doesn't show any product-category so it's perfectly fine
https://floridapsychics.org/shop/tarot-cards/dionysus-classic-design-tarot-cards-deck-with-guidebook
If you click on Tarot Cards in the breadcrumb it will lead to
https://floridapsychics.org/product-category/tarot-cards
I want above url to be
https://floridapsychics.org/shop/tarot-cards
How to do it?
Here are my permalink settings
Permalinks settings
I tried tweaking permalink settings but none seem to work.
I am using WooCommerce and my shoppage is called webshop.
If I go to this pages the URL is https://www.example.com/webshop
This page contains the categories and If I click on a categorie the URL is a little bit strange https://www.example.com/product-categorie/thecategory/
Is this normal? In my opinion it should be https://www.example.com/webshop/thecategory/
Yes this is because of the WordPress URL structure. It is totally fine. But you can also change them by changing the permalink structure.
for changing the permalink:
Goto Settings
Choose Permalink.
Choose what you want (Post Name is good to go).
I have WordPress installed in a subfolder of my domain. I want to keep it there, so that it is accessible only through http://www.example.com/mywordpress.
I have an issue with permalinks. If I use postname permalinks, all my pages (with different templates applied) redirect to the homepage, while my archives (including custom post type archives and singles) are displaying correctly. If I use custom structure permalinks and I prepend anything to the postname – for example /test/%postname%/ – all pages display correctly while custom post type archives and singles display a 404 error.
This happens whenever I refresh permalinks and also after replacing .htaccess with one from a brand new WP install.
The odd thing is also how the permalinks are displaying in the browser url field:
if I use /%postname%/
pages (not working) display as
http://www.example.com/mywordpress/postname – they all display the
homepage contents
CPT archives+singles (working) display as
http://www.example.com/mywordpress/postname
if I use /test/%postname%/
pages (working) display as
http://www.example.com/mywordpress/postname – so without the
prepended text!
CPT archives+singles (not working) display as
http://www.example.com/mywordpress/test/postname – displaying a 404
error
My custom post types have slugs translated to different languages with WPML. I thought that might cause the issue, however I tried to deactivate all plugins included WPML and still no luck.
Does anyone know what might cause that?
I figured it out. I was using reserved terms as custom taxonomy slugs (https://codex.wordpress.org/Reserved_Terms). By changing them to something else everything started working normally again!
I'm usgin WP 4.3.1 and WooCommerce 2.4.6.
After installed almost everything works fine. I go to /shop page and products list there.
I clicked to /product-category/digital-product which is Digital product category but it is blank page. Empty page with just sidebar!
What i have to do to make it show products or sub categories?
Here are permalink settings.
Common Settings
http://localhost/wp/%postname%/ where /wp is my WordPress root.
Product category base: product-category
Product tag base: product-tag
Product permalink base
http://localhost/wp/shop/%product_cat%
1st method:
Disable all plugins ( except WooCommerce ) and check if your issue solved.
If this fix your issue, then try to activate your plugins one by one and locate the plugin which is responsible for this issue.
2nd method:
Try to switch your theme and check to see if this solved your problem.
If this fix your issue, then inform about this issue to your theme developer and ask them to fix it.
find, if there is a file inside your theme root path named woocommerce.php, if you found it, just delete it or rename it to woocommerce.del.php then retry,
This thing fixed my blank page issue.
I want to change the permalink of new posts while keeping the existing permalink for all old posts for a wordpress based blog in order to retain the backlink power and social sharing score. I have searched the whole wordpress plugin directory and found only one plugin called Advanced Permalinks. I tried this plugin but couldn't get the required resutls. It gives 404 error for all previous posts.
Could you any body help me in this regard?
you must set default setting at the beginning and put page id and post id like ?page_id or ?p on the page or post then change the permalink option from setting. Wordpress change permalink at run time from default setting.