Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
9 views

Creating a child page with the parent set as the front page results in strange permalink

I'm not sure if this is a bug by the theme author but when I try to create a sub page (child page) with the front page as the parent, the resulting permalink includes the name of the template. This ...
1
vote
1answer
22 views

post_type_link filter causes 404 on the CPT page it's used on

When i change the permalink of my CPT using filters it gives a 404. I clicked save in the permalinks settings and switched and saved, but there's still a 404. Is there some kind of hooking up i need ...
1
vote
0answers
7 views

How to set a CPT to have a page as a parent, then rewrite urls accordingly?

i have a CPT (called review) for review pages and I want to set these as children of pages i've created. right now my CPT slug looks like this: example.com/review/chewy-review but i have a page on ...
0
votes
0answers
8 views

Updraft Backup is breaking my site and turning all URLs to 404 errors?

I was getting this weird error where all my pages would give 404, obviously a massive nightmare for SEO. I fixed it by disabling all plugins, then turned them back on and resetting permalinks by ...
0
votes
0answers
12 views

Redirection Plugin: Change permalink structure to remove date, want to retain and pass query strings (?utm_)

I have changed the permalink structure from /%year%/%monthnum%/%postname%.html to /%postname%/ I have added the following regex rule to the Redirection plugin: Source URL: ^/([0-9]{4})/([0-9]{2})/([^...
-2
votes
1answer
18 views

How I can show categories in the Search Results?

Can anyone tell, i am using wordpress and i am daily updates my posts. But i want that google will show like this (https://example.com/category) but google show me (https://example.com/category/post ...
0
votes
0answers
16 views

Not Found The requested URL /XXX/ was not found on this server

After changing the Permalink from custom to another one in Wordpress, It became unable to load my pages. What do you think I should do? Best,
0
votes
1answer
35 views

removed index.php now all pages 404

I added this code to my .htaccess file to get rid of index.php, but now all the pages 404 (the hyperlinks are mapped to the correct url) # BEGIN WordPress <IfModule mod_rewrite.c> ...
0
votes
0answers
21 views

The product link in the category does not coincide with the product link

I have category page like this : "/product-category/{category}/{subcategory}" And in this page i get list of all products with url like this: "/product-category/{category}/{subcategory}/{product}"....
0
votes
0answers
16 views

Custom permalink and query with parent_post

I have a custom post type called recordings and they have a post_parent of room I want to have a link of domain.com/recordings/{{room-slug}}. But I dont think I can use the slug like I want to so if ...
0
votes
0answers
17 views

Mystery with permalink: works only with Custom Post Types and not with Posts and Pages

My permalink works only with Custom Post Types and not with Posts and Pages. The permalink structure is https://mainsite.com/mysite/%category%/%postname%/ I'll break down the details of the mystery: ....
0
votes
0answers
14 views

Migrate wordpress from nginx to static

I currently have a wordpress site using plain links for each post (i.e. /?p=123) on top of nginx. I want to migrate this site to a static only site, but not mess up other blog links to mine and search ...
1
vote
1answer
24 views

Completely remove custom post type permalinks (“One Page” website)

I created a one page style website that I converted to WordPress. The website include a blog, but I'm not using the usual WordPress way to display the post as I'm using a modal window appearing on ...
-1
votes
0answers
12 views

Change Permalink Settings causes Publishing failed

Newbie to Wordpress here. After I change permalink settings to anything other than plain, new post turns out "publishing failed". Have tried to change my links from http to https, still not working. ...
1
vote
1answer
29 views

How to remove product base from WooCommerce product permalinks

I read here some information of the issue but didn't find any solution. Is it possible to remove product base using some lines of code for example a filter in functions.php of my theme or plugin? So ...
1
vote
2answers
36 views

How to get the full URL of the current page and change domain of it?

For example, the current url is: https://example1.com/hello-world I want to display this url under the showing article and also change the domain to: https://newdomain.com/hello-world Is there any ...
0
votes
0answers
25 views

How to add a custom permalink structure tag?

I'm trying to add a new %taxonomy-name% tag to Custom Structure in /wp-admin/options-permalink.php. I have registered a custom taxonomy called company, and I noticed that I can use a tag named as ...
0
votes
0answers
12 views

CPT links error: each one links to next one further along in the list

I'm not sure how to word this one at all so suggestions welcome. I'm using this code in functions.php to output a list of posts with anchors on archive.php and home.php function output_link() { //...
0
votes
0answers
13 views

Wordpress not showing 404 when slug is wrong

I have a strange permalink structure : /%category%/news/%post_id%-%postname%.html And I use the plugin "WP No Category Base" It is working fine with one exception : When the "%postname%" part ...
0
votes
0answers
37 views

Permalink for custom post type pages not working

Having some trouble with pagination and custom post types. I have 3 custom post types active currently: 'webinar', 'resource', and 'faq'. For each of these custom post types, I'm using the archive-{...
0
votes
1answer
34 views

When I click on a single post my browser goes to about:blank#blocked and the page is white

I have a single.php template, I also have index.php but it's not reverting to that, its just saying 'about:blank#blocked' in the address bar and displaying nothing on the page. I've tried ...
0
votes
0answers
27 views

Post links broken after migration

I just moved my wordpress site from one server to another. Moved all the files, moved the database, reconnected everything and it (almost) works perfectly fine. Except for this: The links to the ...
0
votes
1answer
32 views

Custom post type permalink returns 404 when set to private

I have a custom post type that is configured to use a permalink structure prepended with the post type name. When using get_permalink(), the URL that is returned does not include the post type name. ...
0
votes
0answers
13 views

I have Akamai pointing to a WordPress installation with a different URL. Is there a way to make WordPress use this for link generation?

I have a WordPress website at, lets say, http://a.domain. For reasons beyond me, I needed http://b to be the URL and the way they found was to put Akamai in front of the website. It works, as I can ...
0
votes
3answers
36 views

Permalinks settings page blank

My site is giving a 500 error and I've been trying various ways to fix it. First, I'm trying to reset permalinks, but the options-permalink.php page is totally BLANK. Unlike all the other solutions ...
1
vote
1answer
52 views

Custom permalink structure with a prefix just for posts

I would like to set a permalink structure with a prefix that will appear just on the posts. The prefix should only be displayed for the posts and not for the permalinks of categories or tags. I set ...
0
votes
0answers
17 views

Standard Page Child of CPT Not Found (404)

I am about to lose my mind figuring this out. I have a custom post type called "portal" and posts of that type can be the parent of a standard page. To accomplish that I've written code that adds the ...
0
votes
0answers
15 views

Permalink issue with Wordpress Site at domain root and another Wordpress Site in a Subfolder

If you look at my site: https://alphahedron.com/ You will see a functioning wordpress site (although not configured yet). If you go to one of my subfolder sites: https://alphahedron.com/game/...
1
vote
1answer
16 views

Default Permalink Type to Postname

I need my theme to default Permalink Type to Postname. Upon activation, my theme is executing the following code: //change permalinks to /%postname%/ global $wp_rewrite; //Write the rule ...
0
votes
0answers
12 views

Issue with wp_insert_post when modifying permalinks with “.html” extension

I'm trying to obtain for products and products category the following permalinks structures: https://mm.mtgeeks.com/product-name.html https://mm.mtgeeks.com/parent-category-name.html https://mm....
1
vote
1answer
50 views

Custom url structure for custom template

I have a custom taxonomy called activities and a custom role called operator. So, if example.com/operators/bird-watching is visited then I want to list all the operators that offers bird-watching. ...
0
votes
0answers
16 views

Permalink like example.com/taxonomy/post_type/postname

I would like permalink structures like this: example.com/%post_tag%/post_type/postname for posts example.com/%post_tag%/post_type for archive page of post_tag filtered with custom post type archive ...
0
votes
0answers
23 views

Permalink structure like facebook.com

I want permalink structure like facebook.com facebook.com/username/about facebook.com/username/posts facebook.com/username/photos facebook.com/username/videos facebook.com/username/reviews I need ...
1
vote
1answer
25 views

Dynamic Template file for subpage

https://www.example.com/tag_name-tag.php is template file for showing posts of any post_tag. https://www.example.com/tag_name/about - I want to show description of post_tag taxonomy term. how can ...
0
votes
2answers
15 views

how do links move when I move my site?

Very new at this, so maybe I am missing some fundamental understanding of how WordPress handles links. But, I'm building a website on my local machine, expecting to upload it to a provider when I'm ...
0
votes
0answers
18 views

Custom optional parameter in page URL

I'm losing my mind, so I do hope I can get some help here.. What I'm trying to do is to create an optional parameter for search page, just for the sake of SEO For example, there are the options: /...
0
votes
0answers
19 views

How to change permalink for listings

I am using Directorist plugin. I want to show the address in url bar like localhost/listingname or listingname.localhost.com. But it is showing localhost/directory/listingname. I want to remove /...
1
vote
3answers
97 views

How to use $_GET function Wordpress backend

I use Plugin Boilerplate for my project. I searched the internet and read all the questions but I couldn’t find what I need. I also read the WordPress Codex. I think I couldn’t get the idea. I have ...
0
votes
0answers
17 views

WooCommerce product id as permalink

Currently, the WooCommerce product permalinks is '/product/shoes-3' , '/product/cup-12' etc. How to change product permalinks to only be like /p/product_ID , for example '/p/1122' without using any ...
0
votes
0answers
16 views

Access non-wp .php file on Wordpress subfolder

I have the following .htaccess for my wordpress / bedrock installation: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /mysite/ RewriteRule ^index\.php$ - [L] ...
1
vote
1answer
64 views

Modifying Author Link to add Author Meta in URL

I have a plugin which adds a custom role called the trip_vendor. I am trying to edit or modify the profile url of this role. Currently, it is example.com/operator/username but I want to change it to ...
1
vote
1answer
25 views

shortcode to output multiple images urls from media library id

I am writing some custom shortcode which outputs an images url from its ID. I would like the shortcode usage to be as follows: [imagez id="211046, 211034"] This is my code: function image_thingy($...
1
vote
1answer
36 views

Automatically append ID to at the end of specific URLs

I need to be able to automatically change normal links to affiliate links on my Wordpress website. For example: when I add a GOG.com link, it should automatically append my partner ID at the end of ...
0
votes
1answer
20 views

Using taxonomy term in CPT permalink – Pages 404's

Having some issues with creating the permalink structure that I'd like. Found a piece of code on Stack Exchange, which unfortunately I cannot locate right now. I have a CPT called project and I want ...
0
votes
1answer
23 views

WordPress Pages that use Domain URL

We create WP pages automatically with the dot in the name. They are domain name pages. So our page gets created with the permalink domain-com but if you type domain.com it will show it as well. I have ...
0
votes
1answer
39 views

WordPress alphabetical A-Z custom post type post result display

How to display WordPress custom post type result alphabetical letters or pagination? for a example i have a post type called "homeless". under homeless there are 50 states (categories). there are 259 ...
0
votes
0answers
36 views

Adding body class in author page for custom role

I am trying to add a unique body class using body_class filter if the role is a custom one via my plugin. I have a custom role called trip_vendor and the url for its profile page is abc.com/operator/...
0
votes
1answer
17 views

why does my url not update after migration?

program using: ubuntu 18.04 Problem: so i have two local wordpress sites running on my localhost, say site1.com and site2.com I have migrated all of the databases from site1.com to site2.com. Now ...
0
votes
1answer
28 views

Changing author slug for a custom role without using plugin

I am trying to change author slug for a custom role. A role called trip_vendor is added by my plugin but I want to change the author slug only for this role. I have a function but this changes author ...
0
votes
1answer
18 views

How do I remove /wordpress/ from my permalinks?

I am a newbie, and struggling a little. My wordpress file is called 'wordpress' in my root file, so I now have domain.com/wordpress/ How do i get my web address to domain.com/example-page? Sorry ...