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.
3,168
questions
0
votes
0
answers
5
views
How to get the proper category in permalink with custom post type assigned to multiple categories
I was wondering if you could help me with the following issue.
I have read a lot of cases, but couldn't trace anywhere good answer which explain, how this works.
I created a custom post type: project ...
0
votes
0
answers
6
views
Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages
I'm encountering a problem with a WordPress plugin I'm developing for DirectoryPress listing pages. The plugin aims to replace the default permalink with a new link specified by users in a custom ...
0
votes
0
answers
13
views
Custom permalink structure for posts in specific category not working
I'm seeking assistance with a custom permalink issue I'm facing on my WordPress website. I've been trying to implement custom permalinks for posts belonging to specific categories, namely "...
0
votes
1
answer
19
views
Not able to change Wordpress Permalink Settings
I am planning to start a new website using WordPress. I don't have any technical knowledge. After the theme installation on my website, I am not able to change the Permalink Settings. By default it is ...
0
votes
0
answers
9
views
My posts images and links are not correct when I publish my home page
For my "https://eclipseglassesreview.com/" website: when I am in Elementor editing my home page, the posts images and links are correct. When I publish the home page, the posts images ...
1
vote
1
answer
11
views
How does WordPress manage to differentiate between post and page URLs without a distinct base, and how can I replicate this functionality?
I want clean URLs without a custom taxonomy name or custom post name.
The project and its structure are somewhat complex.
The customer wants certain strings from a third party plugin to be removed ...
0
votes
1
answer
11
views
changing the default structure of category & tag permalinks
I would like to remove the "category" part of my catergory permalinks structures. I know you can replace this base by using another word, but I want no words.
So, now I have website.com/...
0
votes
0
answers
19
views
Creating Wordpress pages with post name as slug
I have an issue on a domain with a freshly installed Wordpress. I try to change my permalink structure to be Post Name so that when I create a page with the name "Test" I should be able to ...
0
votes
1
answer
35
views
I want to change my permalink structure
I am looking to update my permalink structure by adding a category and date in the UR to make it more feasible for users to understand the post category and published date. Can you please guide me on ...
0
votes
1
answer
8
views
Permalink issue with new blog posts > getting 301 redirect
My permalink structure is: https://website.com/sample-post/
However, each new blog post is getting a 301 redirect from a link like this: https://website.com/2024/01/30/
I see that each new blog post ...
1
vote
0
answers
41
views
Custom permalink for post of one category
I want to customize the permalinks structure for posts in WordPress based on their categories
but only posts of one category,
The permalinks of the "android" posts category become like these:...
0
votes
1
answer
40
views
Understanding images handeling
I am facing an understanding issue with image accessibility on my WordPress website. Here’s the scenario:
My website URL is mysite.com.
I have a post titled “hello-world,” which is accessible at ...
0
votes
2
answers
34
views
All WP pages direct to 404 or index.php
I made a basic site based off the underscores (_s) theme with a CPT/taxonomy, Advanced Custom Fields plugin, and 3 page templates. A simple site. Nothing out of the ordinary.
For some strange reason, ...
0
votes
1
answer
21
views
How to handle custom taxonomy archive when no posts will have that taxonomy
I have a hobby site where I record the changing tenants of a big shopping centre. For each tenant I create a post and use a ACF repeater to store the unit they are in and open/close dates. The unit ...
0
votes
0
answers
19
views
Adding Category to Child Posts Permalink
I'm attempting to add a category of each child post to that post's permalink. The post type is called lessons. I have a taxonomy called Child Categories that contains the terms workbooks and workbook-...
1
vote
1
answer
31
views
How do I disable the changing of the permalink for published posts (for non-admin)?
I want to make it so that, when a post's (not page) status is published, non-admins will not be able to change the URL (using the interface shown in the image). Maybe it's greyed out or just not ...
0
votes
0
answers
5
views
I have two different parent menus in my main menu. the first parent menu with a dropdown is called "services" and the second dropdown is called
I have two different parent menus in my main menu. The first parent menu with a dropdown is called "service" and the second parent menu with a dropdown is called "portfolio". All ...
0
votes
1
answer
65
views
Execute wp_after_insert_post after the permalink is customized
I'm trying to set a meta property to a new post's permalink using update_post_meta. When I run this on wp_after_insert_post I get a permalink that ends in "?p=[ID]". If I update the post to ...
0
votes
1
answer
91
views
How to remove parent slugs from child pages permalinks?
I remove them all right, but when I actually try to go to a page, there is a 404 error.
The code I have used ( variation of Removing Parent Page(s) from Permalink )
function my_pages_permalink( $link, ...
0
votes
0
answers
60
views
Cannot use dynamic prefix for WooCommerce permalink
I need to use a dynamic permalink structure for WooCommerce products, basically, the structure I'm trying to achieve is the following: /<dynamic>/post_name.
So what I did is create a rewrite tag:...
0
votes
1
answer
44
views
How to add .html extension only to pages without child pages?
I have something like this:
Page 1
Child page 1
Child page 2
Page 2
Child page 3
Child page 4
Grand child page 1
Grand child page 2
Page 3
Now I need to make only Child pages 1-3 + Grand child ...
0
votes
0
answers
45
views
Permalinks and redirects
I would like to change the permalink from /%category%/%postname%/ to /%category%/%postname%-%post_id%/
How to set up a redirect correctly?
0
votes
0
answers
19
views
Remove slug of multiple custom post types with and without hierarchical
I have two custom post types called toplijst and product. I am trying to achieve the following permalink structure:
Toplijst:
website.com/toplijst/parent-toplijst/
website.com/toplijst/parent-toplijst/...
0
votes
1
answer
34
views
why same category base and single post base don't work?
I have checked a similar question on the site but there was no satisfactory answer? Here is what I would like to accomplish.
When I set the permalink structure to '/blog/%postname%/' this gives me the ...
0
votes
3
answers
80
views
Modify the permalink structure for a specific category
I searched for many solutions before opening this post, but none worked correctly. This is a complicated matter because it can significantly impact the site if not done correctly.
I need to have a ...
1
vote
1
answer
34
views
Change the slug of post type using custom code
How can the default post post type permalink slug be modified to add /blog? Without changing other post types
0
votes
1
answer
56
views
Yoast SEO canonical URL gets pointed to the homepage
I noticed in Google Search Console that pages are increasingly getting removed from the index due to their canonical. For some reason — it points to the home page for some articles.
After some digging,...
1
vote
1
answer
14
views
How do we ReWrite HTACCESS to point a cat/subcat Product URL, to Cat/ only?
We have a problem where a site has got some odd URLs indexed by Google.
This is the incorrect path:
example.com/shop/mens/jeans/jean-product/
This is the correct path:
example.com/shop/mens/jean-...
2
votes
0
answers
33
views
@wordpress/env cli doesn't seem to properly update permalink structure until visiting the WP Admin Permalink settings page
I'm using https://www.npmjs.com/package/@wordpress/env to set up a local docker-based WordPress development environment, which has been working great so far. I'm trying to build a script using ...
0
votes
0
answers
39
views
Cannot create custom post types with a specific name
I am creating custom post types using this code
function create_custom_post_type() {
register_post_type('courses',
array(
'labels' => array(
'name' => __('...
0
votes
0
answers
16
views
Custom templates based custom url structure in wordpress
I'm working on a website that includes a section for Barbers, and I want to achieve the following URL structure:
Barbers {domain.com/barbers This page will have 2 section, 1 section will list Barber ...
2
votes
1
answer
31
views
How do I get the URL section to show use a different domain in the WordPress Admin?
I am currently using a headless WordPress with NextJS and making adjustments in custom plugin index.php file.
Within the admin, I am trying to create a better user experience for our content writers ...
-1
votes
1
answer
78
views
button onclick with get_post_permalink
I developed a custom post type.
On my archive page for each post there is a <button>.
The problem is that I can't put the link to the post in question.
My button is in my loop.
<button type=&...
0
votes
3
answers
98
views
Custom Post Types, Single Posts returning 404 Errors - flushing permalinks does not correct
I have a website that, using ACF Pro, I have created several Custom Post Types (CPTs) for. All using ACF Pro. Of them, 6 of the CPTs are showing fine with the archive and single templates. They are: ...
0
votes
0
answers
64
views
WP Category Archive /page/2+ pagination issue 404
Encountered an issue when navigating to archive pages within a category after page 1 of the results via pagination. This is the standard WP categories and not a custom query.
Working: /category/...
0
votes
0
answers
26
views
No route was found that is identical to the URL and request method
I am getting the following error message in some plugins after a website move "No route was found that is identical to the URL and request method." I have already renewed the permal link ...
0
votes
1
answer
22
views
Category url; have it only answer to 1 category
I have a permalink custom structure that looks like this /blog/%category%/%postname%/
Thing is, that would make that if a post has category-1 and category-2 assigned, both /blog/category-1/post/ and /...
0
votes
0
answers
30
views
Custom post permalinks for specific categories
I have specific categories posts where i want to remove category name from URL.
My current post link is: https://example.com/my_cat_name/post_name/
I want: https://example.com/post_name/
But only for ...
1
vote
1
answer
28
views
changed permalink structure and now ajax functions are broken
I changed the permalinks from /%category%/%postname%/ to just /%postname%/ and now my custom ajax function returns a 500 error. The exact message I get in the console is:
Failed to load resource: the ...
0
votes
0
answers
37
views
How can I get the product permalink on the WooCommerce shop page?
I have tried several times to get the product permalink on the WooCommerce shop page, but I have a strange problem, the link appears in the Elementor editor, but not on the shop page.
protected ...
0
votes
1
answer
48
views
How to make 2 (or more) custom post type post pages sit under the same slug?
I've created 2 custom post types like so:
register_post_type(
'resources',
theme_build_post_args(
// $slug, $singular, $plural
'resources', 'Resource', 'Resources',
...
0
votes
0
answers
20
views
Best way to approach creating a sitemap with unique URLS (No Permalink Changes)
I currently have been struggling mightily with a conundrum, I currently have a theme that is using day and name permalink settings so changing those settings are not possible, I'm attempting to make a ...
0
votes
0
answers
18
views
how to properly format custom post type rewrite to get specific URL structure for archive and post views
The goal
I created a custom post type for events listing and want to achieve the following URL structures
all archives url
This url returns 404 error
https://example.com/events-list/
single archive ...
0
votes
0
answers
17
views
Post type gives 404 unless logged in
My custom post type gives a 404 (slug translated by WMPL), unless I login to the admin.
Then it works again for several days (it seems), just to become 404 again.
Login in again (without doining ...
0
votes
0
answers
12
views
change the blog in the url if you go from a specific page wordpress
I have a products page on my site, and the products themselves are actually posts.
And also, I have a blog with posts. When I am on the products page, I have a link like:
site.com/products
And go to ...
0
votes
1
answer
40
views
How to have a hierarchy of custom post types and use two of them in the permalink?
General Setup
I'm working on a setup to create a documentary/wiki site for a company. The site should have three different levels of hierarchy and one type of content at the lower end:
level 1: area (...
0
votes
2
answers
86
views
How to Display Content from Search URLs on Permanent URLs in WordPress?
The search link for a WordPress website looks something like this: https://example.org/?s=seo or https://example.org/?s=blogging.
For certain specific pages, I prefer to use permanent links. For ...
0
votes
0
answers
16
views
How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item
Hi hope really someone can assist.
I have created a single-meny-template with post-type-meny, and I have created taxonomy, categories, sub-categories and subcat-items.
What happens is that the ...
0
votes
0
answers
26
views
Is it possible to go to the next post in the same category?
Is there someone who can help me to change the code so the button goes to the next post in the same category?
TaaaaannnnnXXXX
<div class="nk-pagination nk-pagination-center">
...
0
votes
0
answers
61
views
Image permalink interfering with category url
I'm trying to fix an issue on a client's site. The permalink for an image is site.com/Resources while a category is site.com/resources -- I've deleted and reuploaded the image to change the permalink, ...