I need to change the customized URl of wordpress, where I pass the id in querystring to get data from my custom table. Now i want to see the title instead of that id.
Ex. My site link id http://xyz.com/?page_id=1&pid=12
Now if i try the wordpress permalink it will convert the wp page only like http://xyz.com/test?pid=12
What can i do to make the URl like http://xyz.com/test/title. Where title is stored in database for pid=12.
Yes this is possible and actually pretty easy. Go to /wp-admin/options-permalink.php and look for the custom option that you want. You must have access to the server to update the .htaccess file. Here is more info.
if you want the name of your page to appear as in:
http://www.xyz.com/about/
instead of something like:
http://www.xyz.com/?page_id=398
login to your back end of wordpress
under the settings menu(on left side) click permalinks
click custom structure and in the text field type in:
/%postname%/
Related
I have a worpdress website that is set with a permalink structure to:
mywebsite.com/%author%/%postname%/
Now, I have a post that is written by multiple authors - what we wanted to achieve is that we should suppose to be able to access the post by going to any of the author in the url such as:
mywebsite.com/author1/mypost
mywebsite.com/author2/mypost
This actually works, however for some reason when I go to:
mywebsite.com/author2/mypost
this redirects to this:
mywebsite.com/author1/mypost
I think this is due to the base permalink wordpress enforces?
How do I make it so that when I go to the link of a certain author, it will retain the author in the permalink?
eg.
Going to mywebsite.com/author2/mypost should direct to mywebsite.com/author2/mypost
I added a page in wordpress. Wordpress created a url like
https://mywebsite.com/page-title
but I want to change this url like https://mywebsite.com/se/page-title
My Permalink Settings shows https://mywebsite.com/sample-post/
and website is already indexed on google so I can't change my paramlink setting.
I also tried with htaccess and also from wordpress add_rewrite_rule() but no result is coming.
Any help how can I do this?
The simplest way to make your page url like www.example.com/se/se1 instead of www.example.com/se1 is to create page se and se1 make as child page of se.
With this option you'll saved your wordpress website permalink structure, you'll in not need to change your other pages redirects for google indexing
I have a one website in wordpress I used in this custom table, In this there is so many records, so for a see single record I used this url http://www.example.com/view-pitch/?pitchid=36 , but I want to make it seo friendly url like this http://www.example.com/view-pitch/single-record-title.
Can you help me please?
Thanks.
in your site login to admin and goto the setting -> permalink and Select the post name
And Save Change
I am changing my site from Drupal to WordPress. There are many articles written.
Every article has url like given below.
http://example.com/blog/simple-post
How can I achieve this in WordPress.
For now I am using.
http://example.com/simple-post/
you can set it up in settings->permalink and set the option to custom type, then you add this type of permalink : /%category%/%postname%/ instead of just /%postname%/
Then you just assign any category to your posts, like blog, shop, portfolio, team etc whatever you want without having to worry how to set that permalink for lets say two, three types of urls
If you want to keep the exact same URL structure, look at "Permalinks" under the "Settings" option in the admin section.
You can set a custom permalink structure like:
/blog/%postname%/
Edit permalinks in wordpress settings page
Custom Structure http://example.com /blog/%postname%/
If you need category in url
Custom Structure http://example.com /blog/%category%/%postname%/
I'm a newbie to wordpress, I added a new page via dashboard, and I want to make a link to this page from the home page so I would love to know what function does that,
I think it would be something like:
>LINK
Thanks in advance!!
You could use
Link Title
Where PAGE_NAME is the page title you have set in the dashboard.
get_page_by_title() returns an object and we use get_page_by_title( PAGE_NAME )->ID to return the page ID of that page. Note that it is more consistent to rely on the page title (which you set yourself) against page ID (which is set by wordpress).
get_page_link() retrieves the permalink of that page ID you passed as parameter.
You can simply link to the page in the HTML body of the home page. For example:
your page
or
your page
Where ###, put the post ID.
More examples
Edit:
If you are editing a template, and wish to obtain the permalink of the post using its ID, use get_permalink($id)
More information about this function
Edit 2:
Based on your comments, you have to switch the permalink format. In WP Admin, find Permalink Settings, and set them to /%postname%/
Read more about these settings here