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
0answers
59 views

Permalink structure custom-taxonomy-slug/cpt-slug breaks ability to have subpages and pagination (404 error)

I took over a WordPress project from another programmer, who wrote code to create the permalink structure "custom-taxonomy-slug/cpt-slug", the custom taxonomy is "city", the cpt is "restaurant", so ...
0
votes
0answers
13 views

Find and replace wordpress DB to open all links in new window/tab?

After spending a while searching, I found this: Open external links in a new window Also found a javascript powered plugin to perform this change while enabled. But, I wanted to be able to replace ...
0
votes
0answers
37 views

How to set this permalink structure? /custom-taxonomy/custom-post-type/post-name

I'm coding a WordPress website for a festival that takes place in several cities. My custom post type is events and the custom taxonomy is city. I would like to have a permalink structure like this: ...
0
votes
0answers
19 views

Disable -2 Permalink Addition

I am aware that WordPress forbids slugs for pages ending in numerics alone and automatically appends '-2' when they occur. However, other permalink work arounds will not do in my case and I would ...
0
votes
2answers
26 views

How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days

I am currently setting up a WordPress website and everything is going fine except for one issue I simply can't figure out. So basically I have a booking form on my website that allows people to ...
0
votes
0answers
14 views

Permalink in relation with the files

I'm new to wordpress and can't figure out how wordpress link the html/php files on my customized theme to the permalinks of posts and pages. It's a bit long but please read all of them to see what i ...
0
votes
0answers
20 views

single-{post-type} page in front page of wordpress

I create page custom post type services.it will show me front page of wordpress when i create single.php or single-services.php in wordpress,it will not move single-services.php ,again come back front ...
0
votes
1answer
27 views

Permalinks don't update nor link properly

I'm using Events Manager and WPML for my WordPress site. I have changed the permalinks formatting from the default /?p=123 to use the article name. So, for example, let's say that I want to link from ...
0
votes
2answers
85 views

Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post

I am building a custom post type and its respective custom taxonomy. Here is the code: add_action( 'init', 'register_my_types' ); function register_my_types() { register_post_type( 'help', ...
0
votes
2answers
35 views

Is it possible to install WordPress Multisite on a subdomain with subdirectories?

This is something I have never tried so far. On a webspace I want to have a subdirectory like this: blognetwork.example.com Then I want to run Multisite with subdirectories like this: blognetwork....
1
vote
0answers
26 views

permalink structure postname and wp internal routing (301 vs 404) [duplicate]

I don't understand the following behavior: to verify, I have a fresh default/standard wp installation (no themes, no plugins) I change in settings the permalink structure to "post name". I create ...
0
votes
0answers
17 views

Custom author page for custom role

I have created my own author page (author.php) where all the posts from that author is listed. The link to that page is - localhost/abc/author/new-user/. This is working fine in localhost. But the ...
1
vote
1answer
26 views

Programmatically Restrict WordPress from using certain URLs or sub-directories

Is there a way via functions.php or a plugin or .htaccess to programmatically prevent WordPress from using certain URLs or sub-directories? For example: website.com/games/* website.com/eat
0
votes
0answers
37 views

How can I put WordPress in a directory but keep just the home page at the domain root?

I look after the site(s) for a large annual event. Each year we want to archive last year's website and the last few years I've done that by making a copy of WordPress in the appropriate directory. ...
1
vote
1answer
35 views

How to 301 redirect from one url to another properly

We have recently done a massive migration from a custom CMS to Wordpress CMS however want to figure out the right way to do 301 redirects from a situation where their previous URLs did not have any ...
0
votes
0answers
21 views

followup to: Page begins with number, WordPress adds 2

question: is there truly no workaround to wp pages (not posts) adding '-2' to numeric urls, when there's no naming conflict (ie, no conflict such as as a file or folder, of any sort, with the same ...
2
votes
1answer
59 views

Remove words from permalink when saving post automatically?

How can I automatically remove certain words from the automatically generated permalink (it uses %postname%). For example: if a new post is created with the title: How to remove certain words from ...
0
votes
1answer
16 views

image on homepage disappeared due to change of permalink name

where to do this in Wordpress backend? I need to add the missing icons for "Smart living" and "Smart workspace" on homepage section - image is not in available in Media - It is in a section of the ...
0
votes
1answer
21 views

Post URL based on Custom Post Types variables

I would like to create custom post URL from Custom Post Types variable. I considered a way to do that: In Permalinks settings, I see there are some default tags you can choose to compound URL from (%...
0
votes
0answers
26 views

How to Include only last Sub-Category in Wordpress URLs

I have following categories: -Mass Storage --Pen Drive When set custom permalinks settings to this "/%category%/%postname%/" It results like this: http://www.example.com/product/mass-storage/pen-...
0
votes
1answer
78 views

add_rewrite_rule on default post type

I need to add some rewrite rules on my posts in order to have one or more urls for the same post. E.g /foo/post-name and bar/post-name should lead the same post. I'm using this function: function ...
0
votes
0answers
12 views

Custom role not listed

I have a custom role called my_vendor which submits custom post called tour from the front-end. The issue is that the function wp_list_authors() is not listing the users having my_vendor role. However,...
0
votes
1answer
36 views

Disable plugin If slug contains specific word

I want that If Slug contains "revslider" word, deactivate some plugins and If slug doesnt contain this word, again activate plugin automatically. I searched in Google and wrote this code (I am not a ...
1
vote
2answers
46 views

How to change old permalink?

My old permalink structure is /index.php/%year%/%monthnum%/%day%/%postname%/. For example: https://example.com/index.php/2019/01/08/technological-innovation-for-agriculture-sector-in-india/ but I ...
0
votes
1answer
21 views

One post but two separate permalink structure and template views

I am wondering if there is code or a plugin would help to solve my problem. I run a news website. Rather than make a separate custom post type and separate that from the actual story post that ...
0
votes
1answer
33 views

Custom Post Type Advanced Slug

I've been searching for a little while now, and I'm not even sure if this is possible. I have a custom post type 'holidays', for the post, with a category taxonomy 'locations' to put the posts into. ...
0
votes
1answer
27 views

Members-only page, but accessible via sharable link

Our site has a lot of members-only content, but we would like to allow our members to share certain content with non-members. Is there a way to generate sharable links that would allow non-members to ...
0
votes
0answers
24 views

How to change default 'Remove /language/ in pretty permalinks' to 'Keep /language/ in pretty permalinks' into my own plugin?

In my wp plugin, I want to integrate Polylang plugin. But I am struggling to do it. After activating the Polylang all the pages broken until I changed URL modification setting to "Keep /language/ in ...
0
votes
1answer
85 views

Add /blog prefix for all WordPress front end url

My WordPress installed in root directory www.example.com I need home and site URL like below. Site_url. www.example.com Home_url www.example.com/blog I need prefix '/blog' for all frond end URL. ...
1
vote
2answers
27 views

Separate link structure for specific posts (/blog/glossary in stead of just /blog)

I would like to create the following link structure: my.domain.com/blog/'postname': this is the standard structure for blog posts my.domain.com/blog/glossary/'postname': this is a separate structure ...
1
vote
2answers
42 views

I need a custom permalink for my website

I have following scenario: my-domain-name.com/google.com my-domain-name.com/twitter.com I need a custom permalink structure to pass google.com or twitter.com to domain_name query variable. I have ...
1
vote
1answer
149 views

How to edit the slug/permalink in Gutenberg?

After updating to WordPress 5 and creating a new post, I can add a title, but how do I edit the slug or permalink?
1
vote
0answers
68 views

Removing custom post type slug from URL

I want to remove custom post type slug from URL and for this I have used this solution Removing slug from custom post type URL It is working fine but I also want to add category with custom post type ...
0
votes
0answers
142 views

Permalink / category base prefix is missing - how to force it? / SOLUTION FOUND

there, I am trying to set up a category base prefix. For some reason, WordPress skips those bases altogether. Here's the structure I would like to accomplish: mypage.com/topics/category name, ...
0
votes
0answers
32 views

Rewrite Custom taxonomy on Permalink?

I use Custom taxonomy = ABC which have term like "a1, b1, c1...". Now I want my posts' permalinks structure is like this: abc.com/a1/post-1 and abc.com/c1/post-2. I set Custom Structure in Permalink =...
4
votes
2answers
184 views

WP JSON list all permalinks

Scenario I'm considering writing a custom wp-json endpoint to list ALL permalinks for everyone post in my wordpress. Question Is it possible to do this with a rest query + filters? eg. http://...
0
votes
1answer
22 views

add different custom fields value to post class if permalink or index

As the title suggests, I am trying to apply the values from different custom fields to the posts classes depending on wether the post is viewed in the index page or permalink page. I am not a coder, ...
0
votes
1answer
19 views

permalinks constantly needs re-saving

I have my WP running on an Nginx environment, with Wordfence, WP Rocket, and Search&Filter plugins installed (along with some others). Permalinks are working just fine, except /search permalink ...
0
votes
1answer
131 views

Removing WP custom post type slug causes 404 error with blog posts when blog does not have front slug

I've tried this wonderful solution (solution below, original post here) for removing the slug from a custom post type, but unfortunately it causes a 404 error for blog posts when the blog slug is ...
0
votes
0answers
19 views

Title attributes on Permalinks for posts and products

I need to add title attributes to my wordpress links for new posts, pages and products on a website. This is for the actual post/page/product and not within content. For example if I create a post/...
0
votes
0answers
19 views

How can I set the permalink of an article / page equal to the permalink of an existing article / page?

I'm using posts in a slider, whit its permalink in its title. So I'd like to change its permalink equal to an existing page to send users to visualize the page I'm pointing for. It worked until ...
0
votes
0answers
94 views

added code to permalink (URL)

I have a wordpress with WP job manager/resume manager. I noticed that if i add new resume from the front-end i get some code added to the URL and extra variables (candidate name & location as ...
-1
votes
2answers
35 views

Permalinks setting

so, I know this is kind of a basic question, but it somehow oddly doesn't work for me. What I want: https://example.com/blog/thema/categoryname/postname (for posts) https://example.com/blog/thema/...
0
votes
1answer
38 views

Permalink structure has suddenly changed

I've just noticed that the permalink structure on my site has changed, I've tried the usual stuff (flushing permalinks etc) but to no avail. The original structure was mysite.co.uk/blog/some-title ...
0
votes
1answer
28 views

Redirect From Url To Url

I want to redirect the same directory, but different url structure. The url structure I use: http:example.com/car/cadillac/image/2 I want to direct http: example.com/car/cadillac/image/ url. Because ...
2
votes
1answer
49 views

How to change the permalink structure of a master page?

Links on the page I use are progressing as follows: http://example.com/image/1 The code I use for Functions.php add_action( 'init', 'wpse316713_pagination_base_rewrite_rule' ); function ...
0
votes
1answer
22 views

Link to a custom page without a permalink?

I am working on a custom Wordpress theme, I have the index.php setup for the Home view, I'd like to create another page to list all the blog posts, I am familiar with the loop, I just want to know how ...
0
votes
1answer
297 views

How to change url for taxonomy pages?

My Wordpress default category has 'news' category term. I created custom post type with name 'artist' and custom taxonomy named 'genre'. Now what I set in permalink section is below custom structure -...
1
vote
2answers
284 views

Why wordpress kicks me back to the dashboard of xampp? [closed]

Somehow when I was working with my local dev environment, I have made some mistakes in some php files which I could not figure it out. So, I have decided to copy the files from the public_html and ...
0
votes
1answer
31 views

Pages with parent pages giving 404 errors

I have 300 pages website. Suddenly all pages with parent pages are giving 404 error. But when i set no parent then page is working fine. Even i changed Permalinks Settings -> Permalinks and choose ...