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
81 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
24 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
23 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
87 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
49 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
22 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
10 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
51 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
12 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
27 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
47 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
22 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
21 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
18 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
122 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
31 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
360 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
87 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
84 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
votes
2answers
66 views

Accessing WordPress Functions get_permalink() in Vanilla PHP?

Simple question. I'm attempting to use get_permalink() in vanilla php but cannot access it. I have include_once all these "used" files: wp-settings.php wp-includes/load.php wp-includes/link-...
0
votes
0answers
14 views

How to deconstruct a permalink (wp api)

I have a variable set to $this->wp_post_get_permalink() However I need to reset or change the data in the link especially the second part as set in our permalinks dashboard settings without ...
0
votes
1answer
43 views

How to remove the Sub category product URL Woocommerce

Default URL http:// mystore.com/parent-category/child-category/product I want to remove anything between parent-category and product so my urls look like: http:// mystore.com/parent-category/product ...
0
votes
1answer
38 views

How to redirect old permalinks to ones generated by [WP-Hashed-ID] plugin?

I've changed the permalink for WordPress post. Old permalink structure was using the 'post_id' and new one is hashed post id using the plugin WP-Hashed-ID. How can I enable redirection from links ...
0
votes
0answers
13 views

Edit with elementor not working!

i use elemetor based theme and now the edit with elementor option doesn't work. But when i change the slug of the page it will work. but within the old slug it will not. what is the issue? anyone ...
0
votes
0answers
23 views

Colliding custom permalink rules

I'm developing a reviews site in WordPress, but am having some difficulties setting up the permalink structure I have in mind. I created two extra custom post types "reviews" and "...
0
votes
1answer
26 views

Redirect old /%category%/%postname%/ to just /%postname%/

I changed my posts permalinks from /%category%/%postname%/ to /%postname%/. Now all my old URLs are not working and I want to redirect them to new structure. How can I do that? I use nginx
0
votes
1answer
33 views

How to get post permalink url without a href

I need code to get post url without a href, for example: <a href="http://mywebsite.com/permalink" rel="permalink">single post title</a> i just need the url like: http://...
0
votes
0answers
13 views

How can i update custom image fields through the rest API

I want to have a gallery with clickable images on my site that will redirect the user to an external website. To this end i have installed the plugin "Gallery Custom Links" which adds custom ...
0
votes
0answers
25 views

Home page is not loading, where in other pages are displaying on the site

My home page is not displaying on the site, but it is showing that the page is loading. and I have checked all other pages. Everything is working except the home page. Even the posts are also getting ...
0
votes
0answers
40 views

How to prefix `attachment` permalinks with `attachment`?

Could you please help me to prefix attachment permalinks with a custom string (for example attachment) Such that example.com/attachment-slug becomes example.com/attachment/slug? Apply only to posts ...
0
votes
0answers
20 views

Get category base permalink

i need to place category base permalink in my theme like this <?php if ( is_category('in-theaters') ) { ?> <li class="active"><a href="<?php echo esc_url( home_url() );...
0
votes
0answers
20 views

Alter post slug by a filter that is fired just after a post is created

) I found (for example in Set default (auto) slug prefix for Tags) that it is possible for example add my-taxonomy prefix in front of all taxonomy slugs (permalinks). The post is outdated now since ...
1
vote
0answers
26 views

Add custom post type settings to wordress default posts

When I create custom post types in wordpress I got the following site structure which works perfectly with Permalinks "/%category%/%postname%/": Preview and category page: [main]/animals/ [...
0
votes
2answers
32 views

how to get a list of all top level pages

I am trying to figure out how to get a list of the permalinks for top-level pages only. My goal is to put them in a selection box on a form. I have spent a couple of hours searching here for an answer ...
0
votes
0answers
10 views

Help with custom permalink redirect

I need to redirect a URL that looks like this: www.domain.co.uk/information/%info_category% to just www.domain.co.uk/information/ I have the Redirection plugin installed but can't seem to get it to ...
0
votes
0answers
21 views

How do you create pillar content pages?

I'm trying to create a guide/pillar page with subpages and I'm kinda lost. I'm going for something like this: https://www.digitalmarketer.com/digital-marketing where you have /main-keyword/sub-keyword ...
0
votes
0answers
25 views

How Can I Create a Friendly Slug for a Dynamic Page?

I built a dynamic page template that pulls biography information from a MySQL table. The page works fine but the URL is ugly. Officer-Biography/?ID=1 I have a set of canonical slugs that I want to use ...
0
votes
0answers
29 views

How to rewrite rule and change product url to categories and product name?

Will really appreciate your help on how to rewrite products urls to be based on categories names (not category slugs). Let's say this is the structure of the categories and the product: Men (slug: men)...
0
votes
0answers
26 views

Yoast and permalink troubleshooting

For first let me introduce what I've already discovered. I don't know how Yoast calculates the permalink but it's non standard and that fact creates a lot of problems. There are some filters to force ...
0
votes
0answers
18 views

Using CPT slug within taxonomy rewrite causes 404

I have set up a CPT called 'recipes' and have added a custom taxonomy under this called 'categories'. (The main purpose of this is to separate the recipe categories from the blog categories) I am ...
0
votes
1answer
26 views

Edit Post Permalink option removed, looking for possible causes

The edit post permalink button is totally removed ( not hidden with css ) from the edit view - but the slug is still editable from both the Quick Edit view and also via the "slug" panel ...
0
votes
0answers
120 views

Code snippet to add filter pre_post_link to change Media URL (post_type attachment permalink/slug)

I found a very good code snippet to add a "base" into URL of blog posts: Custom permalink structure with a prefix just for posts I tested it and it works great for post_type: post (to test ...
0
votes
2answers
16 views

How to Link to Most Recent Custom Post of Same Term

Title says it all. I'm trying to link to the most recent post of a custom post type, but only within the same term. Currently my code successfully echos the correct term ID but doesn't show a link ...
0
votes
1answer
15 views

How to construct a dynamic rewrite rule for child pages that passes more than one query var

I get a 404 error parent-page/any-child-page/?var1=x&var2=y&var3=z This is what I have so far: I want to have the rule cover any child page add_rewrite_rule('^project-centers/(...
0
votes
1answer
16 views

add all blog posts to folder

I want to add all the blog posts to the /blogs/the-post-name type structure. I can do this through the permalinks settings with: /blogs/%postname%/ but this also affects custom post types resulting ...
0
votes
1answer
24 views

Site Tagline ended up in permalink

When I added a custom tagline for my site in Customizer it made that tagline part of the permalink without my realizing it. I have turned off the tagline. It does not appear in the permalink settings ...
0
votes
0answers
12 views

How to show URL as /base/parentslug/childslug/

I am new to wordpress, I am trying to implement to include /base/parentslug/childslug/. in URL. (Example: domain/parent/child) Can u please help me on 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. ...

1 2 3
4
5
61