Questions tagged [routing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
16 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 ...
0
votes
1answer
31 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'); ...
0
votes
0answers
20 views

How can I force Wordpress + React Router to soft 404 without modifying core? (So that it is crawlable by Google)

So I have been working on migrating one of my clients to a WordPress site. For the most part, the requirements of the site are pretty simple, but the site did need to have a fully custom faceted ...
2
votes
1answer
60 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 ...
1
vote
0answers
22 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. ...
0
votes
0answers
214 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 ...
1
vote
0answers
26 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 ...
0
votes
0answers
34 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 ...
0
votes
0answers
81 views

add url alias for wp-admin

I would to create an alias for /wp-admin in Wordpress. For example if I type mysite.com/admin then it should redirect to mysite.com/wp-admin but I don't know how to do it in using Wordpress ...
0
votes
1answer
62 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 ...
2
votes
0answers
158 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 /...
0
votes
2answers
31 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-...
0
votes
0answers
629 views

Why does permission_callback not ovverride authentication?

I created a custome REST API endpoint for my WP instance, and upon reading the docs, they say that if you return true for the permission_callback function, that this will bypass the authentication ...
0
votes
0answers
9 views

Multisite subfolder - custom definition of a root subfolder path

Fortunately, I have stumbled with the task of allowing slashes in root path of a subfolder multisite. I mean, I have a multisite wp root, and I want that my subfolder root path contains not a single ...
0
votes
0answers
22 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 ...
0
votes
2answers
142 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 ...
0
votes
0answers
72 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 ...
2
votes
1answer
92 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 ...
0
votes
1answer
25 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 ...
0
votes
1answer
40 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 ...
3
votes
1answer
46 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 ...
0
votes
0answers
103 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/...
0
votes
1answer
749 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 ...
0
votes
1answer
99 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 ...
1
vote
1answer
36 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 ...
0
votes
2answers
436 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):...
5
votes
2answers
4k 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 ...
1
vote
1answer
783 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....
0
votes
1answer
2k 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 ...
0
votes
1answer
418 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 ...
1
vote
0answers
82 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 ...
2
votes
1answer
167 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 ...
0
votes
1answer
1k 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 ...
0
votes
2answers
46 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 ...
0
votes
1answer
3k 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....
0
votes
2answers
95 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/...
0
votes
1answer
328 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.'/?$'...
0
votes
1answer
890 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?
3
votes
0answers
233 views

How make a multi language routes, with rewrite rules or rewrite endpoints?

I want to know a concept of making a multi language routing system for WP. That is the best practice, to make this routing system with add_rewrite_rules for pages post archive etc in part, or to use ...
1
vote
0answers
922 views

display dynamic content based on url slug on custom page

i have a custom page named locations and i want the url to load like this: /locations/california /locations/nevada etc.. and upon each page load of the given url as above content is loaded based on ...
0
votes
1answer
423 views

Pages throwing 404 error on server load

I have a really strange problem. I have to fix a strange bug in a wordpress installation that is related to the server load. When the site receive more than 5 parallel request some pages starts to ...
13
votes
1answer
27k views

How does routing on wordpress work?

How does the core wp routing works? I am having a hard time understanding... In MVC, your url looks like mycontroller/myaction that maps to MyController->myaction() In drupal, it's index.php?q=...
3
votes
2answers
1k views

Static raw HTML page

On the server there is a static HTML page example.html in my root folder of the WordPress install. Now when a user types www.example.com/example.html I want WordPress to be smart and bypass all normal ...
0
votes
1answer
541 views

How to add a route?

I'm writing a wordpress plugin. I want to add a route to frontend, for example mysite.com/myroute/ that runs a php file( located in wp-content/plugin/myplugin/my_route_handler.php). I need to load ...
0
votes
1answer
1k views

WP custom routing does not work

I am trying to get custom rounting on WP without any plugins. I have a bunch of links looks like this: http://example.com/u/UserNickname11 I've created a page with slug = "userinfo" and added such ...
0
votes
1answer
916 views

Route to custom file

I would like to create a custom file inside an existing WordPress theme. But I'm not sure how to route to it, and tell WordPress that the route named www.mysite.com/custom should redirect to the ...
0
votes
0answers
803 views

How to make a custom route with any-string-part/number-part pointing to an existing page?

I've got a page with my own widget inside of it which needs some params from the url to produce dynamic db results - don't worry everything is sanitized well and I only let this part out to keep this ...
0
votes
0answers
184 views

Run A Pre-Built Core PHP Application Under A WordPress Page or Post Route

I have a complete application built in Core PHP and a WordPress site which has stable traffic every month, I need to get this new business application up and running under mysite.com/support. The ...
0
votes
1answer
441 views

Extend page routing with custom parameters

In WordPress there is defined a simple routing /%postname%/ So when I access /projects/ it loads me Projects page which has specified custom template_projects.php template. Is it possible to extend ...
2
votes
1answer
86 views

Is there a 'rake routes' for wordpress?

Is there an equivalent to 'rake routes' in php/wordpress that would spit out all the available wordpress url paths available?