I am using Wordpress and Woocommerce. It is generating these ridiculously long URLs:
http://digital-dev.co.uk/a3m/shop/products/portable-stands/portable-counters/
I would like to alter it so that it reads like this:
http://digital-dev.co.uk/a3m/portable-stands/portable-counters/
I cannot seem to get a redirection working correctly for this. Can anyone help? Thanks in advance.
This is a great question. Have you edited the permalink structure in WordPress settings?
Here's a guide that contains information on how to edit the permalink structure: http://edenfried.com/things-you-should-do-after-installing-wordpress/#tab-con-4
Related
Can you help me with one issue? I want to understand how I can make WordPress URL like this structure. Examples:
http://sitename/category-1/subcat/article1
http://sitename/category-2/subcat/article2
http://sitename/category-3/subcat/article3
Searched all google but nothing found :(
General conditions is don't use any plugins or modify functions.php, only admin manipulations. Can anyone explain me how I can do this?
Thanks!
you can do it simply by adding the custom permalink as /%category%/%postname%/
Source: https://www.wpbeginner.com/wp-tutorials/how-to-include-category-and-subcategory-in-wordpress-urls/
I have a wordpress page and when i try to add query string to my page. Ex:
my-page/list-companies?page=2
Wordpress will redirect me to:
my-page/list-companies/2
I dont know the problem is in my code or wordpress settings, can anyone help me with that because i tried google but still no results.
Any help would be greatly appreciated.
Edit:
The problem was the parameter ?page=2, which may cause wordpress missunderstanding (i guess), the solution is change the permalink to Plain or change parameter to something else: ?current_page=2. Thank you for supporting me !
Check permalinks under settings tab in administration and set how URL should look
Goto Settings - Permalinks
And select Post-name (most popular)
I wanted to index this url in the google search mysite.com/courses?id=123. The problem is that I have wordpress installed and I cannot find a solution to this. Any kind help is thankful :)
You can change your permalink structure by going to Settings->permalinks and select a pretty url like the last one. https://codex.wordpress.org/Using_Permalinks
i am trying to change the wordpress url with htaccess, i have the following scenario
My url will look like this, this will be visible to users.
http://www.example.com/custom-field-name1/custom-field2/post-name
While the actual url is this one
http://www.example.com/post-type-name/post-name.
Please help me how this will be possible with htaccess
I guess you require custom permalinks.
Using which you can change your permalink structure as you require with custom fields.
Kindly go through the following to know in depth
http://www.wpbeginner.com/wp-tutorials/how-to-create-custom-permalinks-in-wordpress/
Hope this helps you mate
Edit :
As per my suggestion htaccess is not necessary for this.
Hey guys, I'm trying to use my wordpress categories as subdomains without using a plugin because the only working plugin doesn't seem to work with the new wordpress.
So I created the subdomains and I'm searching for a way to let this category1.mysite.com to show the content of www.mysite.com/category/category1 without redirecting.
but my question is how to edit the links manually for www.mysite.com/category/category1
when someone goes to my site the theme shows links this way www.mysite.com/category/category1
instead of showing the subdomain, so what files or database table should I edit to change the way my theme shows the links of categories and subcategories ?
and also if you have a way to to the first step in the .htaccess file please tell me about it.
and thank you very much :D
Look into get_categories() function - this will return an array so you can do the following
foreach(get_categories() as $category) {
$url = $category->category_nicename.'.mydomain.com';
}
from this you should be able to build your own UL with the information.
It seems like you will need to use Apache's Mod_Rewrite feature in a way that is not standard with WordPress permalink features.