Why wordpress change url automatically when using query string page? - php

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)

Related

Custom category URL wordpress

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/

How to index a site like mysitr.com/courses?id= in wordpress

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

How to change URL links that were made by WordPress?

I have a WordPress blog. All the post are currently in this convention:
http://www.myblog.com/blog/?p=1442
Now I'd like to change the URL of all posts like this one:
http://www.gomidjets.com/blog/this-is-my-post
While it's quite easy to apply it by changing the blog settings, the big problem is about the links I've placed
in many external website. I can't change them, and I'd like to map the old links to the new links somehow.
Do you know how to do it - if that's possible at all?
Do you have a better solution?
Thank you very much
Wordpress will map all old URL to new one, in case if you provided all URL in their original shape, such as http://example.com/?page_id=80
The answer is: you don't need to do anything.
I believe what you're looking for can be found in the admin panel.
In the admin panel (http://www.your-wordpress-site.com/wp-admin), go to Settings > Permalinks
Login to the admin panel first,
go for the settings->Permalink Settings
Select the format you want.
If you want change the base url for only some posts then you can edit from database.
Try this Redirection wordpress plugin to redirect your old url to your new url.
The URL's should resolve fine because the original URL you're using is the permalink one to my knowledge. If you're wanting end users to be redirected to this url, that's a bit harder.
That aside, I couldn't find any plugins that already did this. What you want to do is check the current URL against the wordpress function get_permalink() and if it doesn't match, redirect to the current permalink URL.

clean urls in wordpress

Im using page.php in wordpress for making a dynamic page.
Right now Im using photography/?cat=portraits
But I want photography/portraits
Im currently grabbing whatever is in my query string (cat=portraits) and only showing that content.
Where at in wordpress can I set up the routes or permalinks to be formated more simple?
Permalinks can be found under the setting tab from your WordPress admin interface
Follow this tutorial...
http://www.creativecitrus.com/wordpress-development/how-to-get-pretty-urls-in-wordpress
Or theres the Pretty URL plugin....but Ive never used that
http://wordpress.org/plugins/pretty-url/
Login wp-admin
Settings -> permalinks and choose custom structure place this sting and save it
/%category%/%postname%
If you have any problem in saving permalink please copy paste it in htaccess.
Or make it write permission for period.

Custom plugin + permalinks

How are they?
I have a problem with my own plugin. I have created a custom plugin with custom permalinks, but it don't work and I don't know why.
The url is:
web.com/index.php?pagename=tus-stars&ficha=first-second
I want to show url like this:
web.com/tus-stars/first-second
In other places of Wordpress the permalinks works perfectly, but when I try to do run in this page I have a lot of problems..
This is the code that I use for generate a custom permalink in this page:
http://pastebin.com/ghE7iBkh
What problem I have ?
One thing more. The "first" and "second" parameters only are a text string with one dash between both, not a number or other type.
I hope they can understand me :) My english is very bad !!
Thanks for all !!
Try setting your permalink structure to %pagename%/%ficha%.

Categories