Questions tagged [permalinks]

A permanent link to an item (a blog post, an attachment, ...). The default structure is "?p=123", but WordPress can handle "pretty permalinks" and will rewrite them internally to the former version. If you have a question about special rewrite structures you should use the [url-rewriting] tag.

Filter by
Sorted by
Tagged with
0
votes
3answers
148 views

Get Wordpress username to customize url

I am currently trying to get the current username to add it to the url. The user should be able to navigate to his own dashboard wich is located under domain.com/username. Is there a way to retrieve ...
1
vote
1answer
597 views

How to eliminate permalink prefix in Wordpress Multisite

I have installed the multisite plugin for Wordpress; I have one website in English, and the other in French. However, when I go to Settings -> Permalinks, my English website shows this: I don't ...
0
votes
0answers
18 views

Problem: Redirect all posts to home page when change permalinks in wordpress

I have installed WordPress on my host. The site has no problem but I want to change Permalinks. When I change WordPress Permalinks in settings and save it all posts and categories pages Redirect to ...
1
vote
1answer
19 views

AWS Wordpress Install - pages/posts 404 on restart until updating permalinks

I have launched a WordPress instance on AWS using elastic beanstalk. Every now and then AWS restarts my server and when it does all my pages/posts links switch to returning 404. I can fix this by ...
0
votes
2answers
1k views

Change Category Base For Custom Post Type or Posts Page

I have a few questions and I don't think the outcome I want is possible without adding a custom taxonomy and redoing a bunch of work. I have registered a custom post type - gallery - with taxonomies ...
0
votes
1answer
4k views

How to change URL structure for pagination pages?

Hi I'm new to WordPress hence if my question was simple or stupid I'm sorry, but please someone tell me how to change URL for pagination pages. Currently I'm having URL for pagination pages as: www....
0
votes
1answer
668 views

WP adding noopener and noreferrer to all links

I'm using Classic Editor (not Gutenberg) and WP is adding rel="noopener noreferrer" to ALL the links, whether it is target="" or target="_blank" or target="_self"! I want to remove noreferrer from my ...
1
vote
1answer
2k views

Remove custom post type slug from URL and add taxonomy Slug

I am having an issue while changing a custom post type URL. Current post type URL is: http://example.com/product/product-slug where product is a custom post type. I want to change it to: http://...
0
votes
0answers
6 views

Issue with permalink for CPT and Custom Taxonomy

I'm working on a website with a number of custom post types and custom taxonomies. I've setup a CPT named service with a custom taxonomy named servicecategory. The URL for my service posts look like ...
0
votes
1answer
606 views

Add URL to selected post in meta box

How can I change this code $posts = get_posts(array('post_type'=> 'lesson', 'post_status'=> 'publish', 'suppress_filters' => false, 'posts_per_page'=>-1)); //here you add the ...
0
votes
0answers
19 views

Removing existing attachment permalinks

I have recently migrated a site to another WordPress install by exporting data from the old site into XML and re-importing it to my new site. However, now, all of the attachments were assigned a ...
0
votes
0answers
15 views

An excluded 'ghost' page is crashing my permalink

I am a SEO intern, and I'm having a problem with a wordpress page that I have to optimize. So, I would like to make a better site structure, but when I am going to configure the permalink of the ...
5
votes
3answers
5k views

How to automatically generate a unique random slug

I have tried to create a function that generates a random slug when a post is created. I am a bit worried that the function generates non unique strings as slugs. How can I solve this? The function ...
0
votes
1answer
13 views

How to implement a different permalink structure for custom post type?

Tried to use this plugin, but it doesn't seem to be working: https://wordpress.org/plugins/custom-post-type-permalinks/ I'm setting a permalink structure for by blog posts in settings>permalinks ...
5
votes
1answer
12k views

How would I create a different permalink structure for pages and posts?

Right now I have pages like "about", "resources", etc and the urls are /about and /resources with a custom permalink structure as /%postname%. For "news" section it's the posts and it's at /news and ...
1
vote
3answers
1k views

Permalinks keep reverting to 404 unless I re-save them

I'm running the latest (and constantly updated) version of WordPress on Nginx. Every now and then I wake up to a site full of 404 errors. The fix is to go into the permalinks and just save the ...
0
votes
0answers
9 views

Save form data in database and get Permalink

I have a form from where user will enter data. How can I save form data into database and get Permalink. So using Permalink, if user comes again on that link, I will show that form data as already ...
0
votes
0answers
32 views

flush_rewrite_rules() not working with update_option_{$option}

Will someone please explain to me why flushing doesn't work in my case. I added a custom settings page with a default value, but it doesn't work when I hit save changes. I use the admin_init hook to ...
0
votes
0answers
10 views

Plugin for custom link structure? [duplicate]

I'm working on a site which had default link structure like domain/post-slug. The content team wanted me change it to domain/blog/post-slug so I added /blog/ in custom structure field in permalinks ...
0
votes
0answers
29 views

Wordpress permalink not working on subdomain

My Wordpress permalink not working on subdomain etc : In normally wordpress will redirect automatic like this : www.sub1.mydomain.com/blog/?p=123 > www.sub1.mydomain.com/blog/post-title but now my ...
0
votes
1answer
1k views

WooCommerce product permalink changed

my product structure was like the following before: https://example.com/producto/product-name/ Now, I've done some updates to the translations and this is how the product urls appear now: https://...
1
vote
1answer
4k views

Permalinks stopped working after migration with WP all-in-one migration plugin

I've used a plugin called WP all-on-one migration to migrate my website. I've also saved the permalinks twice, as instructed after the importation. The default permalink setting works fine, but any ...
1
vote
1answer
769 views

Same base for category and post

I'd like to have the following: Single Post test.com/blog/new-category/post-name/ Category test.com/blog/new-category/ So I changed the Permalink structure to: /blog/%category%/%postname%/ and the ...
2
votes
0answers
24 views

Disable shortlinks like ?p=1234 to prevent scraping

I have a site with several thousand public pages that use randomly generated slugs for their pretty urls. The content is public in the sense that if someone knows the URL, they can see the content. I'...
5
votes
1answer
3k views

Remove index.php in permalink structure on IIS server

In permalinks(dashboard) section index.php added. e.g. Current Post Name: http://zakatchicago.com/index.php/sample-post/ Expected Post Name: http://zakatchicago.com/sample-post/ How can i remove ...
0
votes
0answers
10 views

Siteurl and Home values are correctly set in wp_options table. Homepage loads fine as local.sitename,com. Inner pages showing 404 error

I have a local WordPress site set up on Ubuntu 20.04 as local.prowinner.com. The siteurl and home are properly updated in wp_options table to read http://local.prowinner.com. The homepage of the site ...
1
vote
2answers
1k views

NGINX serve Wordpress from sub-path fails with 404, how to fix?

I'd like host review branches for staging, to test and get feedback before publishing to production. I tried to follow some documentation provided online such as the NGINX recipes ( https://www.nginx....
0
votes
1answer
1k views

Updates all internal links on permalink update

Is there a way to update all internal links (in pages, posts, cpt...) when a permalink is updated? Eg: I have a page exemple.com/mypage, and this page is linked in other pages and posts. If for any ...
0
votes
0answers
12 views

Custom product permalink - ID at end

I would like to keep the links used so far in another CMS: domain.com/offer/product/%postname%/%post_id%/ Unfortunately, woocommerce doesn't allow me to use the %postname% tag, or reordering slug in ...
5
votes
5answers
15k views

How to remove category from wordpress url?

I am new to wordpress so i am facing a problem in removing /category/ from wordpress URL http://domain/category/category-name So i would like to know how to remove /category/ from the url. I have ...
1
vote
1answer
13 views

Wordpress blog posts permalinks giving 404 on nginx

I have the following nginx configuration to serve blog on /blog/ URL. server { listen 80; server_name example.in www.example.in; root /var/www/website; index index....
1
vote
1answer
848 views

How to Include the Parent and Child Category in the Permalink if the Post is Added to Both

If I add a post to a parent and child category, I know that only the parent category will be shown in the permalink. For example, if the parent category was "Clothing" and the child category was "...
0
votes
1answer
23 views

Error 404 change permalink term custom term taxonomy

I'm trying to change the permalink structure of the terms for a custom taxonomy, but it's returning page 404. I want the URL to be: example.com/products/category/category-name. I tried to use the ...
0
votes
1answer
76 views

Divi change project category slug

How to change taxonomy urls in wordpress? Following along with this question and this one But can not get the desired outcome. The default is: example.com/project_category/%category%/ What I want is: ...
0
votes
3answers
900 views

Permalinks not working after updating WordPress

Recently I have installed a new version of WordPress and immediately I tried to change permalinks to /%postname%/ and now it's not showing the result. Everything is default according to WordPress....
0
votes
0answers
23 views

Changing Custom Post Type Name Order

I there any way for changing the order of custom post type name in permalink From /{custom-post-type}/{post-name} To /{post-name}/{custom-post-type} Is this possible?
1
vote
2answers
907 views

Wordpress Pages Redirecting to Root with Wordpress Multisite (Sub-Directory)

I am working with Wordpress Multisite (with sub-directory structure). Everything works fine instead of Wordpress pages. When I publish a page and I try to visit it, it redirects to the main multisite. ...
3
votes
2answers
773 views

Changing a custom post type “has_archive” after registered

Ok, I've seen some similar posts on how to change a custom post type's attributes after it has been registered (in my case, I'm trying to modify a custom post type created by a plugin without ...
0
votes
0answers
9 views

Rewrite rules showing blog pagination 404 error

I added below script in my website to setup custom language slug like th, se etc. After adding this below script my pages are working like. www.mywebsite.com/ www.mywebsite.com/se/ www.mywebsite.com/...
0
votes
2answers
1k views

Remove index.php from url in permalinks over IIS server (web.config)

I have a WP installation in its own folder (my-domain.com/site) and I'm trying that site works over my-domain.com. I'm not moving the installation files, actually I'm just giving to WP its own ...
-1
votes
0answers
12 views

Autogenerate Dynamic query string with custom field parameters using jQuery [closed]

we have Hubspot forms for 16 whitepapers that have a property as plain text. I want to populate a custom field value with a query string. But I need to generate query string dynamically & ...
1
vote
1answer
2k views

Removing parent slug in hierachial custom post type

I need to remove the parent slug in the permalink of a child post. The child post is of a different cpt than the parent post. So I get: example.com/parentcpt/parent-post-name/child-post-name //which ...
0
votes
0answers
15 views

Edit the default 'post' custom post type arguments

I'm editing the default WordPress "post" custom post type, to add a "news" prefix before the single posts. I've used the register_post_type_args hook to add my args. It does work ...
0
votes
0answers
9 views

Nested URL with categories, sub categories and pages in between

I'm a bit new to wordpress and would like to know how to achieve the following structure. Essentially I'm creating a website for a store that carries multiple products. For example: site.com/brand/<...
0
votes
1answer
656 views

Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)

What is the difference uri (e.g. get_directory_uri) and absolute path (e.g. get_directory) and when it the best time to use each?
3
votes
1answer
871 views

Passing a parameter to a permalink

I'm trying to create permalinks for a page that currently has parameters passed to it. The site was set up by somebody else and I'm not familiar with Wordpress I have various pages which have URLs of ...
0
votes
2answers
639 views

Does a parent page's post_title have to appear in a child page permalink?

If I have a page called Home and then a child page with Home as the parent, is there a way to avoid 'home' appearing in the permalink for the child page? I've noticed this with a one-page scrolling ...
1
vote
1answer
2k views

After database migration, posts not showing up in dashboard

Transferring domains, I migrated a WordPress database using the export/import functions in phpmyadmin. Everything worked as intended, until I tried to change permalink appearance in the WP dashboard. ...
5
votes
1answer
726 views

Regex in add_rewrite_tag not accepting OR operators?

I am trying to add a custom field to the post permalinks by using a combo of add_rewrite_tag and applying a post_link filter. What I am aiming for is something like this: http://example.com/%...
0
votes
0answers
16 views

Adding custom taxonomy to DEFAULT post permalink structure

I'm trying to use the default post type for news-like articles on my site, but want to modify the post permalink structure to include a custom taxonomy. I'm currently using the default category ...

1
2 3 4 5
61