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
1answer
22 views

I use wordpress wp-page navi

I am wondering if i can change the page name permalink of "site.com/page2" to be like "site.com/paginas2" , or to show only numbers like "site.com/2" . Thank you very ...
0
votes
0answers
45 views

My post permalinks are redirecting to the post archive page for some reason?

I updated my permalink structure so that my posts were prefixed with /stories/. So in Settings -> Permalinks: Custom structure: /stories/%postname%/. My post permalinks updated correctly in the ...
0
votes
0answers
17 views

Multiple Taxonomy Items for Separate URLs

Can anybody just let me know if this is possible for the start? I have Custom Post Type "Recipes" and a Custom Taxonomy "Type", which consist of multiple items: breakfast, snack, ...
0
votes
1answer
27 views

Finding the CPT archive template source

I've created a CPT named kindergarten by a plugin ; I was able to see the archive page of this custom post type with its posts; When I was using Elementor for changing the template of this post type, ...
2
votes
2answers
28 views

Permalinks without post type

I use norebo theme I use it when I open a Portfolio the link is in this format https://www.hshnorm.com/project/fruit-flavored-powder-juice/ How can I remove the word project To be the link in this ...
0
votes
0answers
17 views

Loading page on categories and subcategories url pages

I Have very limited wordpress knowledge and tried many methods but with no luck. I have categories and subcategories with url domain.com/news/sports/ of Custom Post Type. I want to display categories ...
0
votes
0answers
18 views

Wordpress keeps removing query var from the URL

I have a custom post type "press-release" that I pass a query var to the template through the URL. The URL structure looks like this. MYDOMAIN.COM/press-release/TITLE-OF-RELEASE/?client=123 ...
0
votes
0answers
21 views

why is is_post_type_archive returning false even on post_type archive page

I have created a custom as below in a plugin. $args = array( 'labels' => $labels, 'show_ui' => true, 'show_in_menu' => true, 'show_in_rest' => true, 'public'=>true, 'has_archive' =...
0
votes
0answers
6 views

URL Category not 404

I have an issue with redirect originally my URL like this /tips/carrieretips/page/4 but when I add string/page/4` in URL is still OK Like this /tips/carrieretips/page/4/string/page/4/string/page/4/...
0
votes
1answer
93 views

Custom post type category, taxonomy and URL rewrite problem

I'm fairly new to WordPress and I'm working on a website that has an abundant category of products. I want to create a custom post type to add a bunch of products. I'm going to demonstrate what I am ...
0
votes
0answers
16 views

Different URL depending on taxonomy?

Is it possible to create a custom post type with 2 custom taxonomies that will have different URL depending on the taxonomy? Let's say I have created "custom_post" and assigned it to both ...
1
vote
1answer
21 views

Need Help Correct Regular Expression Redirect Code

I have custom permalinks with this code /%year%/%monthnum%/%postname%.html and now switching to another custom permalinks %postname%.html so obviously all my content is now 404 not found, in yoast ...
1
vote
1answer
23 views

Permalinks contain unwanted space resulting in broken links

I have just over 8k products listed on my wordpress site using WooCommerce. Some product links work fine, vast majority for some reason have an unwanted space and - though ( -) resulting in 404, when ...
0
votes
0answers
23 views

404 when using add_permastruct()

My wordpress site has the following URL structure defined in WP Admin > Permalinks Custom Structure : /articles/%postname%/ For all my default posts. I also have the following rule defined within ...
1
vote
1answer
66 views

How much control do we have over CPT rewrite slugs? Can I create a “root” page for my CPT with out the page path, and then have paths for other pages?

Say I have a CPT called I dunno, "Library" which is just a set of "pages" ("has_archive" => false) and the rewrite slug is "library". I also intend to have ...
0
votes
1answer
22 views

How to fix get_the_category function returning incorrect slug?

So, I'm having an issue where using the get_the_category function is returning an incorrect slug. My code snippet is as so: <?php $category_detail=get_the_category($post->ID); foreach($...
0
votes
0answers
19 views

How to enable to change Permalinks for Individual Custom Post Type

I have created CPT "Jobs" and I would like to display possibilities for publishers to change Permalinks for Individual Custom Post Type in the edit section. How can I do it?
0
votes
0answers
64 views

How to create preview link of draft post with slug

In Wordpress, the Draft post preview will have the below link: mysite.com/?p=2000&preview=true But I want to custom this link to slug/permalink like: mysite.com/my-category/my-post-slug?preview=...
0
votes
1answer
28 views

Why can't change the permalink of my page/post?

I'm doing this for a school project. The instructions have pictures and it says I should change the permalink under "URL Slug". However, "URL Slug" isn't anywhere on Document... ...
0
votes
0answers
9 views

Permalink for CPT without archive but including taxonomy returns 404 on all other pages and posts

I'm trying to achieve the following permalink structure for a Diensten custom post type: https://domain.com/%taxonomy%/%postname%/ With the code below I've achieved the desired permalink structure ...
0
votes
0answers
14 views

Wordpress Frontend Page using Plugin

I'm trying to create a front-end page using the WordPress custom plugin where I want to create a custom registration page. I have created a boilerplate plugin, where I can only activate and deactivate ...
0
votes
1answer
36 views

MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn't help

I import my custom terms from a desktop program using MySQL queries. But all the terms lead me to a 404 page. I tried flushing rewrites many times, it didn't help. It only helps when I save individual ...
0
votes
1answer
18 views

Fire a code when permalinks updated

I would like to execute some php code when permalinks updated, I think some plugins I'm using them updates permalinks programmatically sometime and this breaks my some slug rewrite settings, at this ...
0
votes
0answers
14 views

How can I short-circuit WP to stop looking for pages after the first slash?

I'd like to be able to create links such as mysite.com/products/{category}/{tag}/{number} but unfortunately, every time I go to a full-link, it's no longer on the "products page" and it ...
0
votes
1answer
19 views

How to prefix custom post type URL with custom post taxonomy term?

For one of my CPT, when default permalink looks like example.com/CPT_slug/%postname% instead I would like a permalink like this : example.com/%custom_taxonomy_term%/CPT_slug/%postname% With regular ...
0
votes
0answers
11 views

Losing get parameters when redirected due to old url

I have a WordPress site which people link to with some get parameters, basically like so: https://www.example.com/2020/09/01/my-slug?myParam1=something&myparam2=somethingElse Now I noticed that if ...
0
votes
0answers
11 views

How avoid error 404 after add post id to slug for custom post type? (post_type/%post_id%-%slug%/)?

I want to have permalinks which will be look like: example.com/mypost/%post-id%-%slug%/ And the following code do it. But when I try to go to url of the post... I get error 404. I have this code: To ...
0
votes
0answers
12 views

Configuring separate permalinks for posts and archives

I'm working on a site where posts are organised by category/year/month/posts. /%category%/%year%/%monthnum%/%postname%/ I've had a request to provide the site category/year/month archives (/%category%/...
0
votes
1answer
119 views

WooCommerce return 404 in the product page

I am making an Ecommerce website with the plugin: OCEANWP. I had an issue with links of products, because they aren't the same so i changed it in Setting > Permalinks, but after when I go to the ...
0
votes
1answer
35 views

How to add a sub directory to WordPress single posts without affecting other post types?

I've been trying to add a subdirectory to my blog post's permalink for example domain.com/blog/post-slug/ However, this is affecting the other post types that I've created using Pods such as domain....
0
votes
1answer
9 views

Get multiple category names from permalink

I am trying to get category names for the ones that are available in permalink. e.g. I have the following permalink structure. abc.com/product-category/category-1/category-2/ Where as category-1 and ...
0
votes
0answers
63 views

How to get the custom page get_permalink?

I have create two a custom page called page-blogs.php and page-blog-content.php. In the page-blogs.php I am displaying my all the custom blogs post and page-blog-content.php will display the blog ...
0
votes
0answers
16 views

Does single webpage do not need navigation to create a slug in permalink?

I have concern about the permalink in my working project do i need to create a slug for the permalink in navigation. Your answer will highly appreciated. Someone help me stock in
0
votes
2answers
88 views

How To Load an HTML File As A WordPress Page (With No 301/No Redirect)

Here's what I'm trying to do: Page URL: https://example.com/the-page/ What it should load: https://example.com/content/oct2020/index.html When visitors go to the permalink /the-page/, I'd like that ...
0
votes
0answers
21 views

.htaccess to redirect to a wp page

My custom .htaccess commands are above the WP ones. This is working: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^$ wp-content/ahoj.txt [N] </IfModule> It shows the contents of ...
0
votes
1answer
53 views

Empty the_excerpt() broke the_permalink() under him?

I have a problem. It is <?php the_excerpt(); ?> empty from gutemberg <?php the_excerpt(); ?> pull little part of content from post but first next <?php the_permalink(); ?> under is ...
0
votes
0answers
22 views

WPML Homepage as root page (directory for default language)

I'd love to have example.com as my homepage example.com/en/ as my translated homepage example.com/cs/services for pages in the default language example.com/en/services for translated pages WPML offers ...
1
vote
0answers
28 views

Permalink for a custom post type isn't working and I don't know why

I think this question was answered a lot, but despite all threads I couldn't find a valid answer: I'm working on a website with Wordpress (and without any plugin). Here the creation of my custom post ...
0
votes
0answers
31 views

When I modify the product's permalink, the pages stop working

I'm trying to modify the Woocommerce slugs with the object $wp_rewrite. When I modify it, everything works as I put it, but the rest as the pages stop working. Here the code: public function rewrite():...
0
votes
0answers
14 views

How can I rewrite the URL of my custom taxonomy to include the year?

I've created a custom taxonomy that allows my school's newspaper to organize stories into special issues. However, some of the special issues we publish are the same every year. For example, our Black ...
0
votes
0answers
14 views

Structuring permalinks with multiple templates and taxonomy

I've got a custom post type and taxonomy. index template url.com/fruit browse template w/ filters url.com/browse browse template w/ filter selected url.com/...
0
votes
0answers
19 views

URL gives 404 error of my subfolder site when i change permalink

I have Created a subfolder site https://learnforget.com/hindi/, but in this, i am facing an issue. Url of the subfolder works fine when i use default url, but when i try to change my permalink to %...
0
votes
0answers
42 views

How can I make a post sub link?

I need to create a sub link for each post that will contain specific info about the post that I don't want displayed on the post page. I am thinking of making a link as follows, but I'm not sure how ...
0
votes
0answers
29 views

Edit permalinks WordPress

I need help with this issue (custom permalink). I need change permalinks. post_code custom filed inside posts if post_code exist them make the peramlinks like this /%category%/%year%/%monthnum%/%day%/%...
0
votes
2answers
17 views

Homepage template and url changed?

when I activated the theme. it is only one page. the navbar links are Home #About #Services #Contact the problem when I make template name on the frontpage <?php /* Template Name: front-page */ ...
0
votes
0answers
37 views

Change / Alter Product Category Link with Page Link

I'm using this snippet to alter a specific Category link with Page Link and its working well : function wpa_alter_cat_links( $termlink, $term, $taxonomy ) { if( 'category' == $taxonomy && ...
0
votes
1answer
38 views

Adding a custom field to a slug

I'm using the WP Job Manager plugin, and want to add the company name field to the slug automatically when I save a post. I've got it working using the code below, but once I save and then edit the ...
0
votes
1answer
14 views

Show content without a post

I am writing a plugin, and want to show an about page, but without a post/page record. So if, the url https://example.com/about is entered, my 'hardcoded' content is shown. A bit like the login page, ...
0
votes
0answers
25 views

Rewrite rule for changing permalinks. Post name to permalink with Category

SCENARIO A I have an wordpress site that has existing posts. Permalink structure is currently configured to https://sitename.com/%postname%/ I need to change the Permalink structure to https://...
0
votes
0answers
14 views

How might I disable the slug edit button for any post that has ever been published?

I want to disable the slug-edit (my permalinks) button on post.php for any post that has ever been published, which includes posts that were once published and then unpublished. However, after having ...

1 2
3
4 5
61