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).
Related
I am working on a website for a company right now and I am running into this issue:
The original URL is similar to this: mysite.com/industrial/ where industrial has 4 subcategories which each have 2-6 pages within them. I changed the original URL to mysite.com/products/ but the subcategories and pages within are not changing to include products in their URL - they still use industrial.
For ex.: mysite.com/industrial/abc/ should be mysite.com/products/abc/ but it stays as mysite.com/industrial/abc/ after I made my change.
I assume that the subcategories are in a folder called industrial (I did not create this website so I do not know), however I can't find that folder anywhere and I'm not sure where to look. I have tried to go in to each of the subcategories and change their URLs, but I can only edit the abc part of the URL and I can't touch the rest.
** This was all done on Wordpress with a custom theme created by another company. Thank you in advance for any help you can offer!
EDIT: For anyone who is also struggling this problem this is how I solved it:
Go to Plugins -> Plugin Editor
At the top there was an option called "Select plugin to edit" -> chose the one that is custom to your website
I found the information that was suggested by Phil in the comment section on this website
I updated the names of my fields in the rewrite permastruct section for register_post_type as well as register_taxonomy
Update the page and flush your permalinks and you should be good to go!
Check what is the defined slug when registering the custom post type.
Whenever a new Custom Post is added through a plugin or them, then the permalinks needs to be flushed.
In the WordPress admin area, go to “Settings > Permalinks”. Click “Save Changes”. The permalinks and rewrite rules are now flushed.
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 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!
I have a wordpress multi-site:
site1.local.loc [with subdomains on my local] and I would like to have three pages on this.
site1.local.loc/works - (posts page, but I want 'Works' as my title)
site1.local.loc/about - (static page)
site1.local.loc/contact - (static page)
Since 'Works' is my posts page where I keep putting in content, I changed my permalinks for this site to:
/works/%postname%/
However, when clicking on 'view post' at the end of posting anything, it leads me to a '404' page which means there is a disconnect. This is also the case for viewing any page. Is my .htaccess file faulty?
How do I solve this? Also how do I make all my posts appear in my 'Works' page (as in, how to make that page the posts page?)
Thanks!
Updated: I've found out that I get a 404 for any page that I create for a site in a wordpress network.
You do not have to touch .htaccess file.
Make a custom post type that is called works. All those posts made in that custom post type will have that url that you desire. There is no other way to do it. (even if there is, it must be dirty) That is celanest way, and since wp does it by itself you can expect that nothing will go wrong wnen you update, install plugins, etc.
Create a category called "Works" that would then show all posts added to that category by simply going to /works/ all posts would then be shown as /works/post-name/.
You will need to change the permalink structure to /%category%/%postname%/
Check this in administration
Settings > Permalinks > Post name
I have a slight problem... we made a change to our url structure the other day and have broken links all over.
What I did was change links from:
http://blog.mydomain.com/articles/123
To:
http://blog.mydomain.com/articles/this-is-a-smaple
Is there anyway to direct any links linking to the pages ID number to the postname????
The old url structure is still being published throughout our RSS feed on facebook. So I am trying to catch those people that are or maybe clicking on our links on our facebook posts and redirect them to that posts postname url? Does that make sense?
Thanks and help would do
Matthew,
You can use the Advanced Permalinks plugin. It'll redirect old permalink structures to the correct posts. Checkout the description on the plugin page.
In your new URL handling code, check to see if everything after the last slash is decimal numbers, if so, use the old URL handling code.