Skip to main content

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

Accidentally Changed Permalink Structure

I accidentally changed my permalink structure form "postname" to "plain" but when i realized all my articles that were ranking are disappeared so i changed it but nothing changed ...
Jazib's user avatar
  • 1
0 votes
2 answers
27 views

Custom permalink for 'post' not working

I want to set custom permalink for (standard) post and have url structure, like site.com/guide/news/ - blog list (or archive) page site.com/guide/news/post-name - for single post My steps: I have a ...
Toologic's user avatar
0 votes
1 answer
32 views

WordPress CPT & Custom Taxonomy with the SAME Permalink Structure

I have a CPT: 'Guide' and Custom Taxonomy 'Guide Category'. What I want to achieve is: The CPT permalink structure is: example.com/guides/custom-taxonomy/post-name/ So that the following should ...
Elgameel's user avatar
0 votes
1 answer
46 views

How to automatically flush permalinks?

Is it possible to write function that will trigger flush_rewrite_rules() on a timer? I would like for it to run every hour
John Saputo's user avatar
0 votes
0 answers
18 views

woocommerce permalinks like "?p=%post_id%"

I need to use a permalink to a product page in woocommerce like "?p=%post-id" The settings do not seem to work because I try this I get a link like "?p=15/name_of_product" While ...
Martin's user avatar
  • 1
0 votes
0 answers
18 views

How to get selected variation from URL?

I create my own way of displaying the list of available variants on the product page. I display individual variants on the main page of the store so that when the customer goes to the product page, he ...
patryk siuta's user avatar
1 vote
1 answer
43 views

Is there a way to auto-link to products when writing a post?

I have created a post where I list items in my product catalogue and add links to said products. Currently, I manually add links to the products once I have typed them out. However, I want to know if ...
Mus's user avatar
  • 117
0 votes
0 answers
16 views

Display last category child in permalink

I have a travel blog with multiple categories and subcategories and I'm trying to find/create some code to include on my functions.php file so the permalink only contains the last nested subcategory ...
Diego EPDV's user avatar
0 votes
0 answers
15 views

taxonomies ACF Wordpress

I have a landing page that follows the same UI but depending on the URL path, it will render different content. for example the base URL is sitename.com/lp/top10/. following that it will either be A ...
Odelia Finkelstein's user avatar
0 votes
1 answer
9 views

Where does the redirect from shortlink to permalink happen?

When requesting short urls they are redirected to their matching permalink, for instances : shortlink permalink /?cat=category_id /category_base/category_slug /?p=post_or_page_id /custom_structure/...
challet's user avatar
  • 111
1 vote
0 answers
9 views

After moving content to a new site, gallery thumbnails are not pointing to media files

I am moving content from an old site based on Wordpress 4.9 to a new website based on the current release and PHP 8. I have moved all the content - meaning posts, pages, media, and so forth - using ...
Ondrej's user avatar
  • 111
0 votes
0 answers
14 views

Using Custom Taxonomy in Default Post Slug

Hoping for some help... This relates to similar questions but with some variation where I haven't been able to get to a working solution. What I'm trying to do I want to use my created custom ...
Danny C's user avatar
0 votes
1 answer
15 views

how to ensure url uses post_name and not query post id?

the situation : my settings > permalinks are sets on post name, but sometimes anyway a post url is using the query post id : https://my_website.com/?p=4348 instead of https://my_website.com/my_post ...
hugogogo's user avatar
  • 111
0 votes
1 answer
19 views

Modify Post URL Programmatically

I am creating post using wp_insert_post(). I would like to insert Post URL at that time. How can I do that ?
Foysal's user avatar
  • 449
0 votes
0 answers
21 views

When accessing all pages except the homepage I get Nothing Found

I try to identify the reason why when visiting any page I get the message Nothing Found Ready to publish your first post? <a href="http://site.local/wp-admin/post-new.php">Get started ...
user615274's user avatar
0 votes
1 answer
17 views

Changing permalink won't redirect to new version of page

I created a new version of a Page. I changed the permalink of the previous (deprecated) version. I then changed the permalink of the new version to the original permalink. Unfortunately, Wordpress ...
jchwebdev's user avatar
  • 775
0 votes
0 answers
12 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 ...
Brango's user avatar
  • 1
1 vote
0 answers
9 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 ...
Xplosio's user avatar
  • 11
0 votes
0 answers
16 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 "...
mtr's user avatar
  • 1
0 votes
1 answer
26 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 ...
Pradeep N's user avatar
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 ...
Leroy's user avatar
  • 1
1 vote
1 answer
14 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 ...
Rick Pestel's user avatar
0 votes
1 answer
14 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/...
travelsforfood's user avatar
0 votes
0 answers
20 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 ...
eligolf's user avatar
  • 123
0 votes
1 answer
36 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 ...
Stumble Guys's user avatar
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 ...
Meek Mill's user avatar
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:...
Heisenberg's user avatar
0 votes
1 answer
47 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 ...
kocjs's user avatar
  • 23
0 votes
2 answers
39 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, ...
user239138's user avatar
0 votes
1 answer
23 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 ...
Damien Carbery's user avatar
0 votes
0 answers
20 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-...
Felicia Santos's user avatar
1 vote
1 answer
36 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 ...
user18102663's user avatar
0 votes
0 answers
6 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 ...
George g's user avatar
0 votes
1 answer
100 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 ...
Tim Troiano's user avatar
0 votes
1 answer
278 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, ...
BonMoDo's user avatar
  • 11
0 votes
0 answers
61 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:...
sfarzoso's user avatar
0 votes
1 answer
53 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 ...
BonMoDo's user avatar
  • 11
0 votes
0 answers
47 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?
W1ns's user avatar
  • 1
0 votes
0 answers
20 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/...
sem roijackers's user avatar
0 votes
1 answer
123 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 ...
yucelm's user avatar
  • 3
0 votes
3 answers
119 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 ...
Jader's user avatar
  • 1
1 vote
1 answer
42 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
Hambs's user avatar
  • 11
0 votes
1 answer
113 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,...
dodov's user avatar
  • 197
1 vote
1 answer
16 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-...
Simon_a6's user avatar
2 votes
0 answers
38 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 ...
jv-dev's user avatar
  • 121
0 votes
0 answers
41 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' => __('...
Waleed's user avatar
  • 1
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 ...
Tarun's user avatar
  • 1
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 ...
Tim Tran's user avatar
-1 votes
1 answer
111 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=&...
Thica's user avatar
  • 17
0 votes
3 answers
255 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: ...
Mitch S's user avatar
  • 27

1
2 3 4 5
64