Questions tagged [url-rewriting]

Refers to the process whereby an URL is manipulated to create what in WordPress is called a "pretty permalink"

Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

Remove custom permalink base from CPT custom category and custom tags

I have a 'resources' CPT with 'resources_category' (custom category) and 'resources_term' (custom terms). They are all working, however the category and terms URL's pick up the base permalink slug ('...
christiaan's user avatar
1 vote
1 answer
546 views

404 error- issues with pages after adding custom rules for posts

I am trying to create a custom translation for my website. Quick Story: I am facing "404 error-Page Not Found' issues with pages after adding custom rules in functions.php $newrules['^th/(.*)$'] =...
Naresh's user avatar
  • 123
1 vote
1 answer
184 views

How can I use get_post_meta with add_rewrite_rule to build custom permalinks?

I'm trying to change the url structure of my custom post type posts, but It's not working correctly right now. What I'm trying to do is change the urls of my custom post type (Test) posts via ...
DeltaG's user avatar
  • 899
1 vote
0 answers
77 views

rewrite URL based on selected taxonomy for post page

I have a taxonomy called "group", and their values like "red", "blue", "green" (these are generating dynamic" no any fixed group value. during post ...
Roshan Jha's user avatar
0 votes
1 answer
19 views

Make the blog page a child of another page and rewrite the blog url

I am trying to make my WordPress blog page a child of another page and have the url structure reflect that. However, I also have other custom post type archive pages set up that should not be ...
Tanner Mann's user avatar
0 votes
0 answers
26 views

I have a problem with WP_Rewrite

I have a problem with RewriteCond. I admit that I don't know how to use these directives (or maybe I haven't searched enough). I have a URI like this: /photos=the-most-appreciated-books-about-fashion-...
user2986284's user avatar
0 votes
1 answer
311 views

Creating a custom rewrite for a single page

I am quite new to working within wordpress but am getting along quite smoothly. I have setup a website where its downloading external JSON data from rapid-api and then displaying them in my design. ...
Chalkie's user avatar
0 votes
1 answer
25 views

Having a problem with rewrite_rules and rewrite_tags - url not rewriting properly and query var missing

I am almost tearing my hair out trying to get to grips with the Wordpress rewrite rules and tags. From within a plugin, I've created a page called 'childpage', it is the child of another page called '...
appshine's user avatar
1 vote
0 answers
28 views

How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/

I am trying to achieve this in WordPress, but no luck Here '/communities' is custom Taxonomy of post type 'PAGE', '/Palo-alto' is term from communities taxonomy . I want user first to click on ...
Shubham Shinde's user avatar
1 vote
2 answers
565 views

Why slash is removed after domain?

I have installed different sites through my admin panel as below screenshot. But when I click any of the menus of My Sites it is redirected to the wrong URL like, https://www.example.comwp-admin/...
Sohil Sardhara's user avatar
0 votes
0 answers
28 views

How to properly set the rewrite rules for this case?

I'm having an issue wih the rewrite rules. I can't figure out how to properly build it to get what i want. I got a taxonomy with a slug called "acceso-mayorista", which mean a place where ...
Carlos Tinca's user avatar
1 vote
0 answers
18 views

Display Externally Retrieved Data within a Custom Template

I'm attempting to connect a firebase project to my wordpress site via a plugin. So far, using the kreait/firebase-php package, I'm able to retrieve the data that I want from the plugin and var_dump it ...
acupofjose's user avatar
0 votes
1 answer
323 views

How to change URL for custom post type archive?

I'm trying to change the URL for my custom post type archive. At the moment, the archive of my post type has the URL https://example.com/myposttype/ I want to change that to https://example.com/xyz/...
TheKidsWantDjent's user avatar
0 votes
0 answers
22 views

How to handle this wordpress custom post type rewrite problem?

i have a custom post type called "carrier", this cpt has a custom taxonomy called "carrier-category". the cpt has the following rewrite: 'rewrite' => ['slug' => 'carrier/%...
Tobias's user avatar
  • 101
1 vote
0 answers
34 views

Url rewrite on index.php?term=[term_name]

Im having some troubles with Url rewrite ... I have a Custom Post Type with an custom taxonomy... I would like to when visiting the url [ site_url ] /[ custom post type slug ]/[ term_slug ] to ...
Rasmus P's user avatar
0 votes
0 answers
178 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 ...
Timothy Fisher's user avatar
1 vote
0 answers
39 views

Trying to find the location of a rewrite of the URL query

After my original question was deleted, I'll try this another way. Here's the problem. If I update my WordPress from 5.4 to 5.5, some pages are missing some information. I have a folder-like structure ...
chris_blues's user avatar
0 votes
0 answers
21 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, ...
Dachony's user avatar
0 votes
0 answers
243 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 ...
Jason's user avatar
  • 205
0 votes
1 answer
3k 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 ...
Reza's user avatar
  • 3
0 votes
2 answers
68 views

rewrite rule generated with mpdf to a shorter version

I'm saving some pdfs into a folder with mpdf, the urls of pdfs are like this: https://example.com/wp-content/themes/mysitetheme/invoices/invoice_8937.pdf I want that if someone open this url it will ...
silvered.dragon's user avatar
0 votes
1 answer
83 views

SEF add_rewrite_rule & add_rewrite_tag not working

I'm making SEF urls for my plugin. To logic is: if there is my_shortcode on the page, then pass the rest of url as parametr dir= This code is perfectly works on one of my wordpress installations and ...
Movs Ovs's user avatar
1 vote
1 answer
69 views

Server (WordPress) redirects files that are not supposed to (using htaccess)

I use .htaccess to redirect some addresses or avoid some addresses to be redirected. Basically, I have all things redirected to another domain except for certain addresses that I specified. So example....
ARH's user avatar
  • 23
1 vote
1 answer
616 views

Wildcard forward all posts and pages with few exceptions

I want to move my domain from example.com to example.dev and also set a wildcard forward. I use WordPress for blogging, now I want all posts and pages to be moved to the new address but I want some ...
ARH's user avatar
  • 23
0 votes
1 answer
201 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 ...
Artem's user avatar
  • 305
0 votes
0 answers
70 views

Rewrite WordPress Url from root to subfolder without moving files

I have a WordPress installation in the root folder "example.com/". I want the url to be "example.com/blog". (Rewrite from root to folder "/blog/") Is it possible to do ...
Julian Stark's user avatar
0 votes
0 answers
40 views

Define multiple prefixes for custom post type

I have created CPT called "Pharmacy" which have a lot of pharmacies inside (approx 10.000) Pharmacies offer 2 different services (skin & scalp) and some provide both services but some ...
Dachony's user avatar
1 vote
0 answers
20 views

How to figure out redirection and contents in hybrid solution containing word press content and legacy code (ASP.net)

I have legacy solution(ASP.net) hybrid with wordpress content, I have access to my ASP.net code base but not wordpress content. How can I figure out which section in my site is served through ...
Newton's user avatar
  • 11
0 votes
0 answers
36 views

URL of Website Changed by itself

I have a problem with my client's website. It is from time to time changing its URLs by itself. E.g. we have there a website directly going to /get-started and it for example was changed to /get-...
Šimon Lackovič's user avatar
0 votes
0 answers
44 views

Wordpress pagination broken for page 2,3 with custom permalink. Redirects to baseurl

I have a forum installed with my Wordpress site. My pagination does not work and redirects pages 2,3, or more to baseurl when they are on homepage. Here are the settings: Forum baseurl: https://...
UserBSS1's user avatar
  • 101
0 votes
0 answers
21 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 ...
jxxe's user avatar
  • 206
1 vote
1 answer
294 views

How to change Custom Permalink for Taxonomy? (remove the slashes from term-slug)

I have my code to register my custom taxonomies. function themename_custom_taxonomies() { // Coaching Method $coach_method = array( 'name' => _x( 'Nieruchomość', 'taxonomy general ...
Tereska's user avatar
  • 31
1 vote
1 answer
2k views

remove query arg from url after set query

i make migration plugin from specific script to wordpress, but i have a problem on redirect old urls to new one old urls is like book.php?view=12a34b56 and i want redirect it to book/12a34b56 i try to ...
Boyzen's user avatar
  • 23
0 votes
1 answer
43 views

Rewrite only if no other matching page is found

I'm rebuilding a site in which I am required to change the URL structure for archive pages to something that WordPress doesn't handle by default. I have a custom post type named product, which has a ...
chrispytoes's user avatar
0 votes
1 answer
670 views

Change cannonical URL after changing url with add_rewrite_rule()

So, I'm making a plugin for some niche application for my customer which involves a table with data, and I created a page within the plugin to show more in-depth information about the table row. This ...
Miguel Vieira's user avatar
0 votes
1 answer
922 views

Disable WordPress from changing URL slug when post is published

We have post titles that contain emojis. While creating a post and saving it as a draft, the URL slug generated by WordPress doesn't add the [emoji] from the title. However, when the post is published,...
Shivy23's user avatar
  • 11
0 votes
1 answer
57 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....
bymem's user avatar
  • 11
1 vote
1 answer
592 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 /...
Jivan Pal's user avatar
  • 113
4 votes
2 answers
189 views

How to change default page slug?

I have a CPT called jobs and a page named Job Apply. I am trying to achieve something like below url: http://example.com/job-slug/apply Where, job-slug can be any job. i.e Programmer, Developer etc.. ...
Vishal Bhatt's user avatar
0 votes
1 answer
18 views

Name page template properly

I have custom taxonomy in place which builds URL that way: domain/course/course-name/lesson Course - is a custom post type. I am facing difficulty to reach the right template for lessons. I've tried &...
Alex's user avatar
  • 21
1 vote
0 answers
170 views

Help with Rewrite Rule for Custom Post Type with Query String

I'm trying to get a custom rewrite working: I've got the following URL pattern for a custom post type of 'product': /au/product/product-name-one/?type=customtype1 /au/product/product-name-one/?type=...
Simon's user avatar
  • 11
2 votes
1 answer
2k views

Remove special characters in a URL

I need a help to prevent special characters in URL & it should redirect to 404 error page, if anyone specifically entered characters. I tried a couple of ways through .htaccess but none of them ...
Karthick's user avatar
  • 246
0 votes
0 answers
99 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 ...
Tolyan Dimov's user avatar
1 vote
0 answers
39 views

Rewrite URLs - Custom Post Type - Post Slug, Taxonamy Slug

Am using a third-party plugin for listing schools. Custom Post Type = school Custom Post Taxonomy 1 = school_type (eg. values = Primary, Intermediate) Custom Post Taxonomy 2 = school_location (eg. ...
Vpp Man's user avatar
  • 123
0 votes
1 answer
314 views

Not able to rewrite the pagination URL for the posts

My posts pagination in not working in WordPress 5.5 and So, I want to rewrite the URL for the pagination. I am using posts with pagination in the inner page with slug "post". Current URL (...
Rahul Kumar's user avatar
1 vote
1 answer
383 views

wordpress admin ajax url rename

I came across this topic : How can I rename the WordPress AJAX URL? on trying to rename the url for the admin ajax.php file. I tried the code suggested by Krzysiek Dróżdż which is this // This will ...
user193192's user avatar
3 votes
0 answers
233 views

Taking a value from PHP_URL_PATH won't work after WordPress 5.5 update

A custom WordPress module takes certain int variable directly from the PHP_URL_PATH roughly like this: private function myIdVariable() { $myid = 0; // Support both URL formats: /path/123 and /...
Esa Jokinen's user avatar
0 votes
0 answers
332 views

How to customize the Lost Password URL?

I have a WordPress website on which I have changed the default login url from “mydomain.com/wp-login.php” to “mydomain.com/login”. Currently my lost password URL is at “mydomain.com/login?action=’...
Radu's user avatar
  • 1
0 votes
2 answers
2k views

URL Rewriting for PHP script on an image URL

I built an image randomizer so that when I open a .php file in a URL that it displays the image with readfile($randomImage);. This works locally but when I upload it to the server it gets blocked by ...
w.jelsma's user avatar
0 votes
2 answers
135 views

Woocommerce different URL for every table placed in the restaurant

my company is working with different restaurants to digitize their menus so that people dont touch the menu cards in this Covid 19 pandemic, so every table in a restaurant will have a unique qr placed ...
Aetzad Asghar's user avatar

1
3 4
5
6 7
41