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.

1,147 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
3k views

Remove index.php in permalink structure on IIS server

In permalinks(dashboard) section index.php added. e.g. Current Post Name: http://zakatchicago.com/index.php/sample-post/ Expected Post Name: http://zakatchicago.com/sample-post/ How can i remove ...
4
votes
2answers
3k views

Multiple post categories - single permalink

I created a post which is assigned to multiple categories. Eg: I have a post "My Post", and I put it in "foo" and "bar" categories. Now my article will have two permalinks, "/foo/my-post" and "/bar/...
4
votes
1answer
1k views

Custom taxonomy on permalink

I have a long time problem and look forward for your help. I have a custom taxonomy of "city" (it is no hierarchical like tags). I just would like my URLs to look like this: /%city%/%category%/%...
4
votes
0answers
2k views

get_permalink returns default link

I hope you can help me. So I'm using /%postname%/ as permalink structure, and my htaccess looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /develop/...
4
votes
0answers
188 views

permalinks with get variables

I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows add_filter( 'query_vars','driver_vars' ); function driver_vars( $vars ) { ...
3
votes
0answers
335 views

Using 'Primary Category' in URL

I'm running into an issue where I want to set up categories in my URL (%category%/%postname%), but doing this will create multiple URLs for the same content if I select multiple categories. So, for ...
3
votes
0answers
1k views

Add parent/child taxonomy to custom post type url

I have seen several cases of one taxonomy being added to a custom post type url, but I have modified that function to include a parent and a child taxonomy term. However, I am getting a 404 when I go ...
3
votes
1answer
724 views

Link for the page archive for posts, like using custom post types with get_post_type_archive_link

I am trying to get the page to list all my posts (post type = post) in archive. I can do this with custom post types, with get_post_type_archive_link(), but using get_post_type_archive_link('post') ...
3
votes
1answer
116 views

Remove “-2” from a Toolset Types URL with the same post name

I'm using Toolset Types to create a custom post type, and within that post type there is a taxonomy. I have created two posts with the same name, but in a different taxonomy. For the purposes of ...
3
votes
1answer
2k views

generate custom permalink based on a custom field

I'm newbie to the Wordpress. So far I have a custom post type called 'property'. This post type has one custom field called 'property_city'. In WP-admin - permalink setting, I have selected Post ...
3
votes
1answer
202 views

Page to display an archive of taxonomies

My website needs to have two custom post types and each of these has two custom taxonomies with several terms each. These terms also have to be hierarchical. My problem is, that I don't know how to ...
3
votes
0answers
2k views

Attachment page 404 not found when image is attached to post

I have this new WP webiste I’m working on. Today I was going to design the attachment.php page so that my image pages would look nice, but found that I was getting a 404 for all of them actually. I’ve ...
3
votes
1answer
871 views

Passing a parameter to a permalink

I'm trying to create permalinks for a page that currently has parameters passed to it. The site was set up by somebody else and I'm not familiar with Wordpress I have various pages which have URLs of ...
3
votes
0answers
547 views

Custom Post Type relationship with hierarchical parent and child permalinks

Trying to get my permalink and url structures to behave nicely. I have a Custom Post Type called Diseases. This post type is hierarchical with parent and child relationships. I have another CPT ...
3
votes
0answers
52 views

How to show custom taxonomy in the permalink?

I used the Portfolio Post Type Plugin to create custom tax and post type. I would like to show the custom taxonomy on the portfolio projects. portfolio/customtaxonomy/project while now is ...
3
votes
0answers
268 views

Make Category Base Appear in Posts Permalink (but not tags)

I have a slight problem with WP permalink structure. My aim is to make posts permalink appear with a specific category and it's base, for example: domain.com/custom-base/%category%/%postname% And ...
3
votes
0answers
204 views

Possible to use /%monthname%/ in my permalink structure without using a plugin?

I need to use the following permalink structure so that when I launch the website, the urls will be the same as they were before (moving from a non-wordpress site): /blog/posts/%year%/%monthname%/%...
3
votes
1answer
3k views

Getting a 500 internal server error ONLY on wp-admin/options-permalink.php

I have access to the admin panel, and everything works fine. I can click settings->reading and change anything I want to. But if I click settings->permalinks I get a 500 internal server error. Here's ...
3
votes
0answers
175 views

Stop redirecting to posts not in a category / duplicate slugs

I have multiple posts with the same title, e.g. /states/new-york /cities/new-york /counties/new-york but Wordpress doesn't allow duplicate slugs, so they appear like: /states/new-york /cities/new-...
3
votes
1answer
193 views

Plural Category Base Slug On Category Archive Page

I've got a little problem with the category base slugs. Say I have got a category called 'Resources', with the category slug set to 'resource'. So any post in the category resource will appear with ...
3
votes
2answers
774 views

Changing a custom post type “has_archive” after registered

Ok, I've seen some similar posts on how to change a custom post type's attributes after it has been registered (in my case, I'm trying to modify a custom post type created by a plugin without ...
3
votes
0answers
416 views

Post in Multiple Categories to stay in current category (permalink, next previous post link)

I guess this has been mentioned before, but after 2 days of browsing i haven't find a complete solution. Maybe someone has come across this problem before? I'm building a designer portfolio where ...
2
votes
0answers
24 views

Disable shortlinks like ?p=1234 to prevent scraping

I have a site with several thousand public pages that use randomly generated slugs for their pretty urls. The content is public in the sense that if someone knows the URL, they can see the content. I'...
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 ...
2
votes
0answers
24 views

Mixed unrelated taxonomy in permalink

we have a situation where we want to build permalinks using mixed (unrelated, ie not hierarchical) taxonomies in permalinks on a wordpress site. and we dont want the taxonomy name in the actual link. ...
2
votes
0answers
30 views

Change permalink rule if category is called “uncategorized”

My current permalink looks like this /%category%/%postname% Basically I want something like this: If the category of the post is called "Uncategorized" then change the permalink rule from "/%...
2
votes
1answer
215 views

How to change the permalink structure of a master page?

Links on the page I use are progressing as follows: http://example.com/image/1 The code I use for Functions.php add_action( 'init', 'wpse316713_pagination_base_rewrite_rule' ); function ...
2
votes
1answer
642 views

Flush Rewrite Rules on init or rest_api_init?

if I'm using the REST API to create endpoints in my plugin, should I be flushing rewrite rules on init or in rest_api_init? I realize that it should be done on plugin activation/deactivation. However,...
2
votes
0answers
329 views

How to change the page break <!--nextpage--> URL from ../post/2 to …/post/page2/

I am referencing the WP codex here: https://codex.wordpress.org/Styling_Page-Links but cannot find a way to customize the post URL for page break ( ) feature. For exmaple: instead of the traditional ....
2
votes
0answers
76 views

Multilanguage URLs

I am trying to achieve multilanguage behaviour for my website. I'm very close but not quite there and feel like I'm running in circles. That's why I decide to ask for your help. I'd like to use URLs ...
2
votes
0answers
36 views

Keep taxonomy base name in post permalinks

I have a custom taxonomy (I'll call 'issues' in this example) registered as such: register_taxonomy('issues',array('post', 'pieces'), array( ... 'rewrite' => array( 'slug' => 'issues', ...
2
votes
0answers
69 views

rewrite_rule for custom post type doesn't affect get_permalink

I have a custom post type named course. I added rewrite rules so I can include post_meta data in the URL. /* Rewrite URLs for generate dynamic template */ add_filter( 'generate_rewrite_rules', '...
2
votes
1answer
492 views

Disable WordPress Recognizing Path as Attachment

Whenever you enter an URL with two path segments that doesn't exists, WordPress will automatically parse the query as an attachment. How to reproduce Change you permalink structure to /%postname%/. ...
2
votes
1answer
254 views

Add a URL prefix to permalinks of News category and sub-categories of posts only

I changed http://domain.com/%postname%/ to http://domain.com/news/%postname%/ using the answer provided here: Add a URL prefix to permalinks of one category of posts only. But I am having issues with ...
2
votes
0answers
341 views

removing custom tax & CPT slug, adding taxonomy term in front of custom type

I am having difficulties setting up the following structure in Wordpress: site.com/custom-taxonomy-phase-term/ (taxonomy page but without the taxonomy slug) site.com/custom-taxonomy-phase-term/...
2
votes
1answer
248 views

Permalinks changed with Wordpress 4.9

I've upgraded to Wordpress 4.9 and now all of my permalinks seem to include /index.php/ before the page name. This is not how I set up the permalinks originally. All I want displayed is www.myurl.com/...
2
votes
0answers
89 views

Passing parameters to Wordpress static front page

I have a custom plugin that shows a series of custom posts on a page, i.e. http://www.example.com/permalink/ On that page I have a form to filter the posts according to a number of different ...
2
votes
0answers
55 views

Changing Custom Permalink with Filter

I think I am probably missing something very basic here... I am using the following filter to change the format of the permalink to include a custom taxonomy: Function wpse_56769_post_link( $...
2
votes
0answers
131 views

Add 'articles' prefix before blog posts url without affecting pagination

I tried this solution for adding 'articles' prefix before blog posts on URL. function filter_post_link($permalink, $post) { if ($post->post_type != 'post') return $permalink; return '...
2
votes
0answers
22 views

Link post permalinks to subdirectory /post

How can I get '/posts/' before my posts without affecting pages and post-types? When I change the permalink settings in the wp-admin all changes. I only want the posts to change. I made an Blog ...
2
votes
0answers
151 views

Rewrite my default post URL

I want to have this URL structure for my default post type : domain.com/blog/{post_ID}.php For other pages and post, I want a classic URL like : domain.com/page/sub-page/sub-sub-page/... In the ...
2
votes
1answer
2k views

Can two products with the same name but different category produce unique URLs?

In the permalinks settings I have /courses/%product_cat%. Using WooCommerce I created two different Courses that are named "English", but they have different categories that end up making my urls look ...
2
votes
0answers
2k views

multiple url slug for single custom post type

I have created a custom post type for events. Now within events post type I have created 2 categories. One is 'event' and another one is 'workshop'. The 'event' category post url looks like http://...
2
votes
1answer
480 views

Custom post type and taxonomy permalinks - Structure

Been trying to get a nest of custom post type and taxonomy working (even took a look here) but couldn't get it working 100%. Here is the thing, I created a custom post type texturas_temp and a custom ...
2
votes
0answers
2k views

Add hierarchical taxonomy to permalink for custom post type

I've found various questions about this issue, and I still can't get this to work. I have a post type called "product" and a taxonomy called "type". I'd like the URL for a single product post to be: ...
2
votes
0answers
2k views

change default post archive page link

I can't figure how to change the default post archive link. I've got few custom post types (for instance video_news, slug video), if I type www.blogname.com/video I get the archive.php. And every ...
2
votes
2answers
127 views

How to achieve a clean custom permalink solution?

I am working on the design of a blog with the below(just a sample) category hierarchy. PARENT | ...
2
votes
0answers
3k views

Permalink settings not saving

I just started a new WP installation and my permalink settings are not saving. I have chosen the 'Month and name' option (/2014/06/sample-post/), but when I create a new post, the text shows up as /...
2
votes
0answers
2k views

Custom Post Type and Custom Taxonomy Permalinks

I'm currently working with a client's Wordpress blog that has a permalink structure set in the admin settings as "/speaks/%postname%/". This is so that all actual blog posts (post_type=>posts) have ...
2
votes
1answer
46 views

How is WordPress manipulating the posts like there are folders?

As you know, a WordPress post can usually be seen going to a link similar to this: myblog.com/2014/03/27/sample-post/ There is no folder named 2014, 03, 27 or sample-post in the blog. Until now, I ...

1
2 3 4 5
23