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

Change URL of posts and also Custom Post Type

Right now I have changed the posts url using the settings -> permalink i.e /blog/%postname%/ I have now added a CPT and using the rewrite 'rewrite' => array( 'slug' => 'custom-posts' ), but the ...
0
votes
1answer
7 views

Custom author url and page for another role

I would like to create a custom url and a separate or duplicate the author.php template for another custom role w/o using plugins. I found this related topic but it just modify the author url ...
0
votes
0answers
15 views

Add #primary at the end of navlink permalinks on single posts

I'm trying to add #primary at the end of the permalinks to the previous- and next post on all single post pages, to jump past the header directly to <div id="primary"> when going to the previous ...
0
votes
0answers
13 views

404 Rest Route not found - when serving behind “proxy”

To avoid CORS and speed up my static site, I have made a "proxy" from my static site. Basically, I can make a request to: staticsite.com/wp-json/some-endpoint and it fetch and return the response ...
0
votes
1answer
12 views

Dynamic URL with rewrite rule not working

I'm trying to update my link from this: https://dev.brunchwork.com/next-event/?eb_event_id=106098978902 To this: https://dev.brunchwork.com/next-event/[guest_name_here]/[event_id_here] Following this ...
0
votes
0answers
7 views

Multisite register url got 403 error

I have a Multisite wordpress installed by "subdomain" configuration. My main site and sub-sites and all of addresses works correctly Except the Registration url: http://site.example.com/wp-login....
0
votes
1answer
7 views

Current WordPress Page Title as Search Parameter into A Tag <a href=“www.domain.com/s?=currentpagetitle”></a>

i would like to include an affiliate link as a widget which inserts the title of the respective page as search parameter. <a href="www.amazon.com/s?=titleofthepage">Link</a> I have ...
0
votes
0answers
11 views

rewrite the url keeping the previous one

I would like to understand if it is possible, through add_rewrite_rule, to do this: a user types: https://example.com/username the user sees the page: https://example.com/author/username the url ...
0
votes
0answers
6 views

Looking to Have Custom Permalink For One Post Category, Removing The Base

I have custom permalinks setup with blogs/%postname%/ for the Press category I need it to just be /%postname%/ I've tried a few post re-writes of permalinks but I couldn't find one that removed the ...
0
votes
0answers
10 views

Insert taxonomy slug on URL

Hello people :) I would like to ask some help from the expert people here. I am developing a site that has the ff info Custom post type "Product" Post type taxonomy "Product State" (nsw, wa, sa,etc ...
2
votes
2answers
76 views

Add query string to url and display it as normal url part /folder/

I have a query string added to some urls which isn't pretty: ?city=Amsterdam So i'd like to structure the url like: https://example.com/realpage1/realpage2/amsterdam/ or https://example.com/...
1
vote
0answers
12 views

Wordpress author url to alias domain url? domain.com/author/{username}/

It's possible to create alias domain automatically for new authors? Currently, the author profile URL is -> example.com/author/username I'm using ISPCONFIG 3 as control panel What do I have to do to ...
0
votes
1answer
24 views

How can I access to the same post-type “page” from multiple different urls?

I'm developing a Wordpress website, and I have a problem with permalinks. I need to deal with following situations: http://domain/center1/ -> rewrite to "template_home_page" ( which has a different ...
0
votes
0answers
31 views

How to add a custom text before subpage number in WordPress paginated page permalink?

I have a problem with my WordPress site: I created a page https://example.com/my-page and use page break option (nextpage) in TinyMCE Advanced plugin to split it into different parts, such as https://...
0
votes
0answers
2 views

Rewrite specific custom post types after blog permalink change

I wanted to make all my blog posts sit under a parent directory of /blog/ in the url's, so /my-great-article becomes /blog/my-great-article. I did this by changing my permalink settings to /blog/%...
0
votes
1answer
13 views

Need help with regex

I have this definiton to add a query var: add_filter( 'query_vars', 'add_reg_query_vars', 10, 1 ); function add_reg_query_vars($vars) { $vars[] = 'seminar'; // return $vars; } and this ...
0
votes
0answers
7 views

Replicate author posts rewrite url

I would like to create a custom url where it uses a similar rewrite like the profile url http://localhost/wp/author/foo So something I should get when using http://localhost/wp/store/foo to http:/...
0
votes
0answers
22 views

i want to change URL of WordPress image or rewrite in runtime

this my images url and I want to change( https://oneclickwebsites.co to https://oneclickwebsites.site) https://oneclickwebsites.co/0373990752233591/wp-content/uploads/sites/489/2019/11/image-from-...
0
votes
1answer
10 views

Route subpage to Custom Post Type

I have an artists-single.php page template which shows when I navigate to: /artists/djave_co Is there a way to route /artists/djave_co/anything to the same artists-single.php page? Then I can use ...
1
vote
0answers
26 views

A clean custom rewrite rule for weekly archives

Weekly archives are nearly undocumented, but WordPress can produce them, which I want. Good. But the URLs are ugly, eg. http://example.com/?m=2020&w=18 This gets partially rewritten to /2020/?w=...
0
votes
0answers
9 views

woocommerce product variation permalink

i have some Trouble with my try to develop a solution for my own Online Shop. i can not pay the Plugin what is doing what i need. i try to find a other solution. the beginning is that this code worked ...
0
votes
0answers
6 views

Rewrite URL and Query External API

I'd like to be able to visit a page on my website like website.com/advisor/advisor_id=1234, pass that ID to a function that queries a third party API, return the payload and rewrite my URL as website....
0
votes
0answers
22 views

WP Slug Customization gives Error 404 / Not found (PODs Custom Post Types)

I am using PODs custom post type and I have created bi-relatation between two post types. My idea is to get a custom slug when there is a relation between two custom post types like: /custom-post-...
0
votes
1answer
37 views

Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin

I developed a custom plugin for a site that is using URL rewriting within WordPress to create several dynamic pages. When one of these custom pages is loaded, I'm using the following functions and ...
1
vote
2answers
13 views

Redirect HTTP to HTTPS for all sub domains (blog posts)

I have a Wordpress site functioning as a blog site on a website. The main website is just basic HTML it is only www.example.com/blog which has the WordPress site. I have installed an SSL certificate ...
0
votes
0answers
42 views

Mutiple url rewrite rules and get every params

I am creating a messaging system where I have 4 sections (1)inbox (2)sent (3)draft (4)unread so I decide to go with Wordpress add rewrite rules I already add one rewrite rule section. ...
0
votes
0answers
30 views

Wordpress CPT url structure

I have created a CPT called "listing". I've attached 2 taxonomies to this CPT : listing_type listing_city Is there a way to structure my URLs as below : https://example.com/listing/%...
1
vote
0answers
18 views

How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?

I am working on a test. Where i want the follow to be able to work: https://1587469162.webton.dev/referenties/ = page https://1587469162.webton.dev/referenties/hoofdcategorie/ = main taxonomy https://...
0
votes
0answers
22 views

Change default pagination URL style

My default pagination style on category pages is /page/2/ but I require it to be /?_page=2/ Can I accomplish this with a rewrite? Cheers Janine
1
vote
1answer
68 views

Rewrite Rules to custom template

At the moment I have the following: a custom template: my_custom_template.php where the function below is called. <?php $uni_data = get_uni_data() ?> a page: www.website.com/my_page which ...
1
vote
1answer
14 views

Rewrite URL for only archive page (custom post type)

There is a few Q/A about custom post URL rewrite but I haven't found any simple answer to what I'm trying to achieve. My CTP is "event" and I have the current page structure that I want to preserve: ...
1
vote
0answers
14 views

Custom rewrite url category

I'm trying to add custom rewrite rule for my custom post type. What I want is that www.domain.com/erlebnisse show all posts (that works). Also I want that www.domain.com/erlebnisse/category shows all ...
1
vote
1answer
74 views

How to rewrite URL with PHP variables with htaccess to a normal looking URL?

I want to change an old database website that is not made in WordPress to WordPress. My site uses PHP variables so the URL is originally: example.com/index.php?tl=1&pg=2&bs=3&hcbs=4&...
0
votes
0answers
8 views

How the best way to get and publish single post from network in Wordpress Multisite and create permalink for it like “blog/%site_id%/%postname%”

My idea is collect post from subsites to main site in Network WP MS and open it there. I have found nice class https://github.com/miguelpeixe/WP_Query_Multisite for Multisite Querying. Now i want to ...
0
votes
0answers
5 views

Re-ordering URL structure for multi-lingual blog

I have a main e-commerce website that sites on mywebsite.com, built in PHP & MySQL. (not Wordpress) The website is multilingual, and the URL structure for other languages look like mywebsite.com/...
0
votes
0answers
14 views

What do I need to subscribe to resolve URL/Permalinks?

I have a situation where I would like to do something like example.com/go/special/data/etc such that whenever Wordpress gets a /go/ link, my plugin takes over and responds. What event should my ...
1
vote
2answers
23 views

Get url param no longer works when using add_rewrite_rule

I'm using WordPress admin to create a page (named get-region-page), in which Pod shortcode is used to retrieve the URL parameter. For example: [pods name="region" slug="{@get.regionparam}" field="...
1
vote
0answers
33 views

Rewrite Question Mark in Post Template to Make it Pretty URL

I hope you all are doing well and staying safe during these times. I was wondering if someone can help me figure out how to remove the question mark (?) in the URL. The URL I am trying to rewrite ...
1
vote
0answers
17 views

Right url for custom post type

I have custom post type called news2, and its url is land/news2. The archive page url is working well but how can I set my taxonomy page and single page right // Change custom post type permalinks ...
1
vote
1answer
25 views

How to overwrite registered taxonomy url from vendor plugin in child theme

In a vendor plugin I got this : register_taxonomy( 'listing-region', 'listing', array( 'rewrite' => false, 'hierarchical' => true, 'label' => __( 'Regions', 'bt_plugin' ), '...
1
vote
0answers
24 views

Add prefix to page URL based on the page template

I want to add a prefix to page URLs based on the page template and update also permalinks in the pages. Current URL: www.example.com/chicago Expected result: www.example.com/m/chicago This rule ...
1
vote
1answer
37 views

Preserve old website URL structure after migrating to Wordpress

Old (non-Wordpress) URL structure: "News" and "Gossip" are categories "Italy" and "Uk" are subcategories https://example.com/news/italy https://example.com/news/uk https://example.com/gossip/italy ...
0
votes
1answer
25 views

Woocommerce product rewrite rules not working

I am trying to change the default structure of the woocommerce product url to include the author username. The default url for woocommerce products in my installation is as so: https://<site_url&...
0
votes
1answer
38 views

Custom account page that accepts a query parameter

I am trying to add a new account submenu page that takes a query parameter. I have the following which works: add_action('init', function() { add_rewrite_endpoint('scheduled-order-create', ...
0
votes
1answer
18 views

Rewrite Rules are Redirecting

Trying to get a custom rewrite going for a page. Page Slug: /near-me/ Create Redirect: /near-me/STATE/city/ Even after flushing the permalinks. //* Add Rewrite Rule add_action('init', '...
0
votes
1answer
13 views

How to map domains to specific pages in WordPress and display them in the address bar?

I would like to have the following setup but don't quite know how to do it in cPanel or use WordPress MultiSite or both? www.maindomain.co.uk - with a wordpress install at www.maindomain.co.uk www....
0
votes
1answer
33 views

Permalink not changing according to post type

I am using two post types: a) Posts ( Default post type) also name as blog for blogging. b) case studies ( Custom Post Type ) only for case studies. I want to add the string ‘blog’ for default post ...
1
vote
0answers
13 views

I want to add a new tag to Wordpress URL permastruct

I installed a TV SHOW plugin on my WordPress install. URLs are like this: https://www.mywebsite.com/tv-show/title-of-tvshow Now I would like to add a specific tag to redirect the user to the right ...
0
votes
0answers
29 views

How to allow a variable with “/” in wordpress url

I use an API to get a list of jobs. I have created 3 templates. The 1st shows the list of jobs, the 2nd the details of the job selected and the 3rd a form. To create the URL for the form I must use a ...
0
votes
0answers
33 views

Rewrite priority from query string to permalink

On a site with a custom post type news and a custom taxonomy topic, both with matching rewrite slugs, I'm trying to understand and control WordPress's rewrite replacement priority for changing a raw ...

1
2 3 4 5
37