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
10 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
3 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
8 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
9 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
10 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
16 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
11 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
45 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
12 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
41 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
19 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
44 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
8 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
21 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
20 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
13 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
12 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
12 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
33 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
28 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
14 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
25 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
16 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
9 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
11 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 ...
0
votes
0answers
24 views

Custom permalink wc marketplace vendor/product-name

I'm developing a marketplace website. At some point, I'm stuck and waiting for your support. I use the WC Marketplace plugin. Different vendors can also sell the same product. However, there are some ...
1
vote
1answer
52 views

WordPress Permalinks still not working despite all necessary settings

I apologize for the seemingly duplicate issue posting but I can't seem to find someone who has come across my specific issue and resolved it. This post got close but I did everything they did. here's ...
0
votes
1answer
41 views

Fatal Error when trying to load Permalinks page on WP admin [closed]

I'm receiving the below error when trying to access the Permalinks section on the WP admin. The page does not load and shows the error message instead. I cannot understand what this means or what has ...
0
votes
1answer
15 views

Getting back a permalink from custom url

okay i have made my own rewrite rule, with the add_rewrite_rule function in wordpress to get a custom url, for an plugin page. add_action( 'init', function() { add_rewrite_rule( 'login/?$', 'index....
0
votes
1answer
19 views

Wordpress /page/2 gives 404 when custom permalinks is set to %category%%postname%

My wordpress permalink settings, Custom Structure: %category%%postname%. Used next_posts_link() in custom theme in archive.php to get next posts link. Result: Next Page >> (display as expected) ...
0
votes
0answers
14 views

Change Project permalink to custom URL

how do I change the permalink into a custom url? I want to link the project items to another website. Anyone have experience with this? How can I change that permalink into a custom url? For example ...
0
votes
1answer
19 views

How to update permalink programmatically?

After activating my plugin I should go to settings -> permalinks and click on the Save button to make custom endpoints ( for my-account page ) work. How can I do it programmatically? ( I used ...
0
votes
1answer
15 views

Getting post URL within custom content template

This should be such an easy thing but it's giving me so much headache. I created a content template called content-sticky.php. Added all the code there <article id="post-<?php the_ID(); ?&...
0
votes
0answers
9 views

How to remove weird characters added behind permalinks

I am new in using WordPress to create my own website, currently facing a problem with the weird characters added behind permalinks for each page such as http://www.officeconceptdesign.com/products/#....
0
votes
0answers
37 views

Add_permastruct + $_SERVER['Request_uri'] is it working incorrectly?

Good afternoon. There is a record type, and two taxonomies go to it-geo and model. According to the requirements, it was necessary to rewrite the url in the form /%model%/%post_name%/%geo%/. In ...
0
votes
0answers
20 views

Similar URL structure for default post type (/article/postname/) and custom post type (/article/taxonomy/postname) breaks post links

I'd like to use two similar URL structures for the default 'post' type and a custom post type, the latter including a custom taxonomy (for language): 'post' permalink structure is: article/%postname% ...
0
votes
1answer
9 views

Cannot make custom search permalink to work in a fully custom theme. Search string $_GET['s'] is always empty

I am learning to build a fully custom WordPress theme. I have a search form <form role="search" method="get" class="search-form" action="<?php echo home_url() ?...
0
votes
1answer
17 views

Child theme modifications not showing up

i am working on a job-portal site and i am little stuck into one situation . I uploaded a child theme and activated it. The child theme is activated successfully but it dosent show changes that i do ...
0
votes
0answers
24 views

Multiple slugs for one taxonomy?

I currently have a taxonomy registered with slug moods. So I access the terms with mydomain.com/moods/happy. I also want to access this with mydomain.com/tags/happy. I don't want to redirect. I want ...
0
votes
1answer
15 views

Rewrite/Change custom taxonomy slug

I want this url: => mydomain.com/genre/chant to be rewritten as => mydomain.com/chambers/chant. I want the users to access mydomain.com/chambers/chant instead of mydomain.com/genre/chant. genre ...
0
votes
0answers
20 views

Category base gone after Wordpress update

Problem: After updating Wordpress to version 5.5.1 I noticed that some URLs changed. The way it used to be: Links to the category page: my/website/category/my-category-name Links to the articles: my/...
0
votes
0answers
10 views

How to set custom slug for core post type “post” and core taxonomy “category”?

I am looking for solution to set specific slug for posts and categories. I have default post type and taxonomies (category, tags). Permalink settings - "/%category%/%postname%/" I need ...
0
votes
0answers
16 views

Permalinks Help?

Just wondering if anyone can help, please. Basically I have a Custom Post Type 'Courses', with a taxonomy of 'Subjects'. When I create a Course Custom Post Type I name it something like Oxford English ...
1
vote
1answer
36 views

Can't get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together

Problem specification I'm implementing a website that is meant to host podcast shownotes and transcripts, and so I want custom permalinks and shortlinks for the webpages: Permalinks of the form /...
0
votes
0answers
25 views

Why does updating permalink structure only update posts and not pages?

This might sound like a stupid question but I've honestly looked everywhere. Currently my WP Page structure is {site-title}/{page-title}. This works fine, however I want to change the permalink ...
0
votes
1answer
123 views

How to add_rewrite_rule with two parameters to a single view page?

I'm having troubles understanding how add_rewrite_rule works in my case. I have a page which lists news from an external source. All items are linked with a "read more". Those links look ...
0
votes
0answers
83 views

How do I get the correct URL?

Helo, WordPress Community! Help me, please. Created a custom post type with one taxonomy added as a category. Overwrite rules have also been created to display the complete structure of the CNC, for ...
1
vote
2answers
44 views

How do I make 301 redirection from `/%post_id%/` to `/%postname%/`?

My permalinks is set to /%post_id%/ (post id). https://elrons.co.il/%post_id%/ I want to change them all to /%postname%/ (which is the post slug). https://elrons.co.il/%postname%/ Problem is, whenever ...

1
2 3 4 5
59