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
1 answer
23 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
  • 1
0 votes
1 answer
16 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
8 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
1 vote
0 answers
12 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
  • 111
0 votes
0 answers
37 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
15 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
27 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
26 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
  • 15
0 votes
3 answers
38 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
0 votes
0 answers
54 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/...
ejay's user avatar
  • 1
0 votes
0 answers
15 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 ...
Chris's user avatar
  • 1
0 votes
1 answer
15 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 /...
Fredy31's user avatar
  • 858
0 votes
0 answers
28 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 ...
DevLoper's user avatar
1 vote
1 answer
24 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 ...
jon's user avatar
  • 11
0 votes
0 answers
22 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 ...
Denis's user avatar
  • 1
0 votes
1 answer
47 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', ...
Freddy's user avatar
  • 147
0 votes
0 answers
7 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 ...
cluelessdeveloper's user avatar
0 votes
0 answers
17 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 ...
Nadal's user avatar
  • 89
0 votes
0 answers
16 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 ...
Base's user avatar
  • 1
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 ...
s.kuznetsov's user avatar
0 votes
1 answer
26 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 (...
Stephan's user avatar
0 votes
2 answers
83 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 ...
Ranuka's user avatar
  • 1,782
0 votes
0 answers
12 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 ...
Brango's user avatar
  • 1
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"> ...
Jasper Stamm's user avatar
0 votes
0 answers
31 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, ...
csampson42's user avatar
0 votes
0 answers
27 views

How to Stop Wordpress Change Slug Automatically Same as Title When Publish?

How to Stop WordPress Change Slug Automatically Same as Title When Publish? I am optimizing my old content and editing all Old Posts, But when our writers click on publish WordPress (contributor role ...
ranbir's user avatar
  • 1
0 votes
0 answers
15 views

How to change the category and post prefix/slug to be the same in Wordpress?

Looked all over the internet to find a way to make my website work like that: Having the posts under /blog/ and the categories under /blog/ too. example.com/blog/ example.com/blog/%category% example....
Radu's user avatar
  • 1
0 votes
1 answer
29 views

Duplicate Content Issue with WordPress Permalink Structure and Primary Categories

I have this permalink structure in wordpress /%category%/%postname%/ now suppose i have written a article article with title "Hello World" and i selected two categories for this article &...
Ayushvam's user avatar
0 votes
0 answers
42 views

Bulk Redirect WordPress Posts to Category based URL after Permalink Structure is Changed

function custom_category_redirect() { // Get the requested URL $requested_url = esc_url_raw(add_query_arg(array())); // Get the permalink structure $permalink_structure = ...
WordCent's user avatar
  • 1,827
0 votes
1 answer
41 views

How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?

I have two taxonomies on my site: portfolio works and blog posts. I want blog posts under /blog and I want portfolio items under /work. I have created a page for blog posts and a page for portfolio ...
JugJoe's user avatar
  • 3
0 votes
0 answers
22 views

CPT Rewrite Slug to Another CPT Slug/Key (as CPT-A/CPT-B Format)

I registered multiple custom post types with following pattern: CPT-A: 'has_archive'=> 'cpt-a' and 'rewrite'=> array('slug' => 'cpt-a', 'with_front'=> true) CPT-B: 'has_archive'=> 'cpt-...
Aqsa J.'s user avatar
  • 271
0 votes
0 answers
31 views

Change WooCommerce Product Permalink Structure

According to my suppliers they want the local site and the international site to have the same product URL's just different domain. However my site is built on WooCommerce and there's is a custom PHP ...
Alex Moura's user avatar
0 votes
0 answers
19 views

How do I fix a permalink that keeps adding an extra part on the end and leading to a 404 error page?

I have a permalink that looks perfect but when it's clicked on, it adds an extra section to the link and takes you to 404 page not found. I don't know why this is happening or how to stop it. This is ...
Kenzo's user avatar
  • 1
-1 votes
1 answer
223 views

Allow question marks (?) in WordPress permalinks

I have migrated an older site to WordPress and need to keep all legacy URLs. I am using a plugin called Custom Permalinks for that purpose, which works well, except for one thing: it strips all "...
Dave's user avatar
  • 119
0 votes
1 answer
23 views

Custom Post Types Do Not work on this permalink setting https://somedominaname.com/%category%/%postname%/

If in Permalink settings I use this structure then on default post type this gets applied → https://somedominaname.com/%category%/%postname%/ But on Custom Post Types it is not applied effectively and ...
WordCent's user avatar
  • 1,827
0 votes
0 answers
77 views

Year slug for pages not allowed

I want create http://siteurl/2022 or http://siteurl/2023 page. but when i create page, page slug automatically change to 2022-2 and 2023-2 wordpress is fresh install and no post, page or attachment ...
MAGNETOS SEOTEAM's user avatar
1 vote
2 answers
691 views

WordPress - Custom permalinks for advanced custom fields (ACF) using post type taxonomy

I am trying to update the URL structure for posts within a custom post type. I would like the url to use the taxonomy slug from the "resource-topic" taxonomy, and not the custom post type ...
user2748363's user avatar
0 votes
1 answer
181 views

Add "/blog/" as base for all blog post URL

I want to add /blog/ as base for all blog post URLs on my website. Only issue is, I already have a page with the permalink as /blog/. So now the permalink settings are not allowing me to update as /...
aslamdoctor's user avatar
1 vote
0 answers
19 views

Introducing sub categories into the URL

I have inherited a pretty dated project, and it contains a lot of legacy code, which I am still fumbling around in. Currently I have a custom post type with the URL: /something/faqs/{topic}/{faq-post},...
ChrisBratherton's user avatar
0 votes
1 answer
92 views

Adding tag slug to post permalink

I'm trying to create a permalink structure for regular posts that looks something like this: /category-name/tag-name/post-name I've been using an AI friend that insists I simply use custom ...
LexGear's user avatar
0 votes
2 answers
36 views

Link from page to category posts

I'm stuck and grateful for any help I have a number of categories and a site 'about' page I also have 'about pages' for each of the categories (sort of subject intro pages) The about pages are all in ...
PLinB's user avatar
  • 3
0 votes
1 answer
47 views

WP_PLUGIN_URL equivalent

I am using a plugin that uses WP_PLUGIN_URL and that cause mixed content issues. This is the line of code: <img src="<?php echo esc_url( WP_PLUGIN_URL . '/plugin-name/images/icon1.png' ); ?...
PlainH2O's user avatar
0 votes
0 answers
16 views

Date-based archive URLs to match my /2023/Jun/13 permalink structure?

So, I have a custom function that adds a %monthname% variable to use in permalink settings instead of the native %monthnum%, so that I can have the three-letter month abbreviation in post URLs because ...
Bix F.'s user avatar
  • 1
0 votes
0 answers
16 views

Changing the "OT Process" Plugin's Default Slug of /process/

I'm working on a site, aspacehomedesign.com. We are trying to get the content from /process-a/ to display on this slug /process/. We created the /process-a/ page, while the /process/ is the default ...
Collin1312's user avatar
0 votes
1 answer
13 views

How to Set Both Category and Sub-Category Level at Root. It should also obey post rule as /category/sample-post and /sub-catgeory/sample-post?

I am using WordPress website. Currently Permalink is set up at home/sample-post/ and category is set to "." In present set up my URLs for categories , sub-categories and posts are as follow. ...
Rajeev Ranjan's user avatar
0 votes
0 answers
149 views

How to remove the category from the url only for a specific category of articles on wordpress

I'm using a permalink structure like this on a wordpress : /%category%/%postname% But i'd like a category of articles to appear without the prefix /%category%/ ex : right now it's appearing like that :...
Isisky's user avatar
  • 1
0 votes
0 answers
15 views

I need a permalink post_type structure with taxonomy slug in it for location landing pages and service pages

I am building a Wordpress site that has landing pages for locations in the UK. Each location needs sub pages to represent a service relevant to that location. To do this, I have set up service pages ...
itsthatseoguy's user avatar
0 votes
1 answer
12 views

Blog URL Structure - Multiple Taxonomies

Does anyone know how, if it's possible, to include a base slug, two taxonomies and the blog title are the URL? All posts would have either one or two categories. e.g. /blog/{category-one}/{category-...
Sjwdavies's user avatar
  • 111
0 votes
1 answer
77 views

Rewrite permalink with PHP processing

I am creating an unusual URL format for permalinks. I don't think the permalinks can be processed thru mod rewrite, so I need PHP to rewrite the URL somehow. I was able to create a URL like this: site....
Scot Nery's user avatar
  • 101
-1 votes
1 answer
23 views

How to make my custom permalink pull up the correct post

I'm tryin to make short urls. Using base_convert, I can change site.com/10 to site.com/a I'm currently using this... function shortest_permalink_make_url( $url, $post, $leavename=false ) { if ( $...
Scot Nery's user avatar
  • 101

1
2 3 4 5
64