Questions tagged [routing]

The tag has no usage guidance.

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

Problem with custom WordPress Rest API search route with query parameters

I'm building a search component in a ReactJs application sitting on top of a headless WordPress CMS and I've run into a problem which I can't seem to fix. It might be that I'm doing something ...
Stef's user avatar
  • 103
0 votes
1 answer
139 views

How to Create Custom Route to a page in WordPress

I want to set a new Route in WordPress that will be redirected to the desired path by entering a specific pattern. for example: When I enter any url like below: http://mywebsite.com/audio/Everything ...
yaradan's user avatar
0 votes
1 answer
195 views

no_rest_route error on custom routes

I'm trying to set up a custom endpoint. I've been following https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/ but I can't get the route to register. Below is my ...
johncarmackfan95's user avatar
0 votes
0 answers
27 views

How to implement very unusual wordpress routing structure?

Been trying the last two weeks to setup an unusual routing structure for a WordPress website but cannot manage to make it work. Basically there is a custom post type that will get the post url based ...
Jen H's user avatar
  • 1
1 vote
1 answer
85 views

how do i create a specific handler for a url?

I want to create an image generator that will use a url like : /image-generator?a=1&b=2&c=3 The image generator will be dynamic and create an image based on the params. It will also output the ...
DAB's user avatar
  • 111
0 votes
1 answer
77 views

WP returns to domain root instead of siteurl

On various admin actions (e.g. delete a post), my fresh WP install (dev.mydomain.com/website) returns to the domain root (dev.mydomain.com) instead of dev.mydomain.com/website/wp-admin/edit.php?some-...
Jos's user avatar
  • 426
0 votes
0 answers
75 views

How do you load a different page in WordPress

I need to have a page display a different page depending on the content of a cookie. I can do this using a 301 redirect, but it's slow. I want to do it entirely within WordPress using a plugin if ...
Peter Wooster's user avatar
2 votes
1 answer
1k views

WordPress with Tor Onion Service (dual .com & .onion domains for same website)

I'd like to make my existing wordpress website www.example.com also accessible over a tor onion service = www.examplesite12345.onion. How can I do this? Note that the two domain's content should be ...
Michael Altfield's user avatar
0 votes
0 answers
172 views

How to route root path / to /xyz in nginx?

I am using PHP based application in which i need to configure Nginx. I wanted to forward only path / to /?product_cat=top and all other request will remains same. below is my Nginx configuration: ...
Sanjeet's user avatar
0 votes
0 answers
127 views

How to create a custom route in wordpress without any plugin?

I need to create a custom route in Wordpress to run some $.post callback methods for which I have to use init hook method, is there any way we can simply create a route ?
harshal's user avatar
  • 103
0 votes
2 answers
346 views

How to change all routes with language codes

I need to dublicate all existing routes with several language codes: /2020/03/11/Hello-world /en/2020/03/11/Hello-world /de/2020/03/11/Hello-world /Hello-world-page /en/Hello-world-page /de/Hello-...
Digerkam's user avatar
  • 219
4 votes
2 answers
2k views

Custom routes for custom post type?

I have a custom post type called 'event'. An event has multiple subpages like registration, speakers, contact us, etc. Currently the content is saved as one or more custom fields. I would like to ...
gloom's user avatar
  • 175
0 votes
1 answer
340 views

wp_get_nav_menu_items doesn't return custom post type item

I try to achieve a menu like this (this is the actual menu). There is a tree of projet coordinated by the wordpress menu that manage route and navigation. Here is a scheme of the menu and the ...
Liroo Pierre's user avatar
1 vote
2 answers
2k views

Routing dynamic numeric slug to custom template

How do I make WordPress use a template for any requests where the url is /careers/[0-9]+? We used to have custom posts for job openings handled by single-jobs.php - then switched to an Applicant ...
Julix's user avatar
  • 131
3 votes
1 answer
21k views

REST API: No route was found matching the URL and request method

I'm having issues adding a custom REST API route to Wordpress. Using my own plugin, i've registered the route as followed: add_action( 'rest_api_init', function() { register_rest_route( $namespace, ...
BroodjeBE's user avatar
1 vote
0 answers
36 views

Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts

I'm a self-taught programmer with a very little experience in WordPress programming. I'm using a post permalink structure in this way: https://domain.com/parent-category/child-category/post-title-...
SurpiLurpi's user avatar
1 vote
1 answer
289 views

Add language prefix to permalinks

I have a wordpress website that has multiple translations, and i was trying to get the website to determine the language to load from the URL e.g. if its https://website.com/sp/about-us, load contents ...
whynowork's user avatar
0 votes
1 answer
1k views

How to create custom dynamic url

I want to create my own url like this http://localhost/wptest/content/programs/trainings-conferences/ I have create my own plugin and use this code. add_action('init','wpyog_add_rewrite_rules'); ...
Sudhir's user avatar
  • 113
3 votes
1 answer
845 views

WordPress and VueJS routing problem

I am testing the integration of a VueJS app in WordPress. It actually works (no styles yet). BUT If I access a URL like https://example.com/my-vue-route/about, the .htaccess URL rewriting redirects ...
DudiDude's user avatar
  • 131
1 vote
0 answers
89 views

How to show the root webpage on all subpaths

I want to show the same page on all the subpaths on my web site /events/ /events/firstOne /events/secondOne/edit /events/whatever/blahblahbla/helloworld All that urls must load the same root page. ...
Enuff's user avatar
  • 111
1 vote
0 answers
600 views

React Router with Wordpress

I am using React Router (React app in a home page) with WordPress. The problem is when a user first loads a page with client URL route, for example site . com/recommendations, they see a 404 error. I ...
gdfgdfg's user avatar
  • 162
1 vote
0 answers
27 views

permalink structure postname and wp internal routing (301 vs 404) [duplicate]

I don't understand the following behavior: to verify, I have a fresh default/standard wp installation (no themes, no plugins) I change in settings the permalink structure to "post name". I create ...
stavroSE's user avatar
0 votes
0 answers
52 views

How to intercept not found URL, parse it, and generate dynamic result?

I would like to catch the URL handler after it fails to find any matching page, but before it handles the response as a 404. Then, based on whether I match a regex in the URL, I might like to ...
Michael Teter's user avatar
0 votes
1 answer
546 views

Routing multiple routes to the default page

I have multiple routes that I need pointed at index.php to handle routing in a React app. Here's a list of routes: /login /logout /profile /sign-up /coming-soon /forgot-password /content/:content_id ...
Mike Cole's user avatar
  • 159
3 votes
0 answers
571 views

Custom URL rewrite to specific page template

I have a standalone page with the slug: hubv2 that is using a custom page template which runs a small React app. The React app handles in browser routing and it works fine. For example I can hit /...
Jake Rainis's user avatar
0 votes
2 answers
305 views

How I can make category url

I tried to make mysite.com/category page where I want to see list of categories. How to show list of categories I know. I can not make a link 'category'. I have tried to call this file 'archive-...
Yaroslav's user avatar
  • 109
0 votes
0 answers
26 views

Define a new sub-folder naming - Multisite

Does anybody know how to redefine the naming of subfolders in WP Multisite during a new website creation? I want the next URI www.wp.mu/sub1/sub2/ So, the new website in the network will be under ...
Paul Burilichev's user avatar
0 votes
2 answers
693 views

How to make "virtual" translation with polylang installed (but without Polylang)

I have a CPT called "domaines" (its like vineyards in french). My site have 2 languages (french and english), configured with Polylang for pages and menus translation. I don't want to use Polylang ...
William Ode's user avatar
0 votes
0 answers
430 views

Add specific route for Custom Post Type (add/edit...)

Is there a way to add custom route for CPT on front end ? Actually, I've a "project" custom post type. I need an URL like : mydomain.com/project/add and mydomain.com/project/edit with 2 dedicated ...
William Ode's user avatar
2 votes
1 answer
426 views

Custom URL routing based on cookie value

I'm looking for some advice for the following scenario: We will have a site for a company with multiple locations throughout the US. Some of the pages are specific to a certain office location while ...
Ruben's user avatar
  • 133
0 votes
1 answer
30 views

Index template always follows page_template() template?

I am setting the page template for a route but index.php always follows the custom template, is it because it's 'include_'? Feels like it should be 'set_' or 'load_'... I want to replace the output ...
James's user avatar
  • 101
0 votes
1 answer
61 views

Group based routing and administration

A client requires that a website he ordered uses a group-based system for navigation and administration. Eeach group effectively represents a department in a company and there will be a fairly small ...
PeterTheLobster's user avatar
3 votes
1 answer
49 views

Capturing arbitrary semantic URL arguments

So, My articles have this URL structure : mydomain.com/category/article-name I'm using ACF to add additional information to my post types. For example, another text field with some related ...
Reygoch's user avatar
  • 189
0 votes
0 answers
126 views

Wordpress dynamic subpage for ACF

I'm using ACF to add additional data to my post types. Concretely, I'm using repeater field to add new item with a title and content box. My article has url like this : mydomain.com/2016/10/24/...
Reygoch's user avatar
  • 189
0 votes
1 answer
1k views

Redirect sub-page URLs to parent without changing URL

I am having an issue with redirect rules for a single-page app that is on a sub-page of a Wordpress site. I have followed this set of instructions pretty directly and am still having issues: Redirect ...
Jeff's user avatar
  • 101
0 votes
1 answer
137 views

Changing the Organize Series Listing Pages

I'm using the Organize Series plugin on my WordPress site. This plugin adds a custom taxonomy type named "series" that allows you to group posts together. This plugin includes a custom listing page ...
Alana Storm's user avatar
1 vote
1 answer
40 views

How can I have a page on a site that isn't a 'Page' in the WordPress sense?

I have created a system whereby users can sign up and then be searched for on the frontend. The search uses WP_User_Query and works great. I want each user to have their own profile page, which ...
mikemike's user avatar
  • 265
0 votes
2 answers
1k views

Changing WordPress routing to load the same page for different URLs

I'm converting an existing website to a WordPress theme. One of the pages is a gallery that uses JS history.pushState to create unique URLs for loading certain images. E.g. page URL (non WP website):...
Ido Schacham's user avatar
5 votes
3 answers
9k views

How to display a raw HTML page (bypassing WordPress theme, scripts, etc)

I'm a software engineer with a WordPress site with hundreds of pages, and it's working very well. There are certain cases, however, where I'd love to be able to code my own page with no interaction ...
Ryan's user avatar
  • 225
2 votes
1 answer
1k views

Child page in custom post throws 404 page not found

Currently I am trying to add a page as a child in my custom post section. The parent pages in my custom posts works correctly, I've set a template file for them as singe-custom_post_name.php. All good....
Freshtea's user avatar
  • 163
2 votes
1 answer
5k views

Custom post type as child of page

I am wondering if it's possible to have a page, let's say called 'books' with some listed books. Next to this normal page we create an custom post named 'books' were we collect our books. Nou I ...
Freshtea's user avatar
  • 163
2 votes
1 answer
507 views

.htaccess for wordpress in separate folder

I'm working on a really odd site which has a couple of Magento installs next to a Wordpress install. the folder structure looks like this: /shop (magento) /shop-world (magento) /wp .htaccess I just ...
Djave's user avatar
  • 258
1 vote
0 answers
172 views

how to trace a file by the route url

i want to know, how can i zero in on the file that is rendered for a prticular route url. I am using the postname permalinks i.e. https://domainname.com/sample-post/ How can i check the file that is ...
isnvi23h4's user avatar
  • 111
2 votes
1 answer
175 views

Create a separate JS application for an individual post?

Automattic is building a React.js based theme called Picard. All the JS code is in picard.js, which you can see a reference to below. Although WordPress doesn't have a "router" per se (as explained ...
Leahcim's user avatar
  • 23
0 votes
1 answer
2k views

How to create "page" used for generating PDF? [closed]

I am new to wordpress but I do have some knowledge base in php. I am developing custom theme for my Wordpress site. I also have a PHP file which generates PDF file based on GET parameters and it's ...
Václav Zeman's user avatar
0 votes
2 answers
186 views

Where and when does WordPress invoke routes

One of my URLs for which I'm wanting to create a Category Archive is coming up with a 404 despite having matching routes and, supposedly, matching templates. I'm going through the core WordPress code ...
Snowcrash's user avatar
  • 317
0 votes
1 answer
5k views

Redirect sub-pages to parent without changing URL

I am rewriting a Wordpress site and plan to turn part of it into an angular app. The site has a bunch of sub-pages of the form /recommendations/xxxxx, and need to maintain these URLs for SEO purposes....
Simon H's user avatar
  • 335
0 votes
2 answers
128 views

How best to create a variation of an archive template work?

I'm still quite new to Wordpress - after a pointer or two. I've created a archive page for a custom post type of 'property'. This is set-up, working from an admin point of view, and I have a listing/...
steve's user avatar
  • 117
0 votes
1 answer
437 views

How to print redirected query string variables to the page?

I have a basic redirection set up: function example_add_rewrite_rules() { $year = '(\d{4})?'; $make = '([a-z]{1,20})'; $model = '(.+)'; add_rewrite_rule( 'c/'.$year.'/?'.$make.'/'.$model.'/?$'...
ExcellentSP's user avatar
0 votes
1 answer
4k views

What php files handles routing?

Given an URL like the following for wordpress http://www.mywordpress.com/2014/10/18/ http://www.mywordpress.com What php files in wordpress is handling the routing?
william007's user avatar