Questions tagged [routing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 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 ...
user avatar
  • 1
0 votes
0 answers
20 views

Custom route and extract data from slashes and parameter

some external website is going to send a specific data into a WordPress site and need to extract and process it. The data is coming trough URL (between slashes and as parameter): domain.com/login_sso/...
user avatar
1 vote
1 answer
26 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 ...
user avatar
  • 111
0 votes
0 answers
30 views

Can't access Wordpress via public IP

I recently installed apache and WordPress on top of that. I was capable of accessing the apache server via public IP but as soon as I installed WordPress I could no longer access the website. Does ...
user avatar
0 votes
1 answer
44 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-...
user avatar
  • 426
0 votes
0 answers
21 views

Custom URL rewrite rules for a web app

I'm working on a wordpress install that functions more like a web application than a traditional website, and I'm trying to get my head around the add_rewrite_rule system. Currently I have three ...
user avatar
0 votes
0 answers
26 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 ...
user avatar
1 vote
1 answer
821 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 ...
user avatar
0 votes
0 answers
96 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: ...
user avatar
0 votes
0 answers
47 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 ?
user avatar
  • 103
0 votes
2 answers
199 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-...
user avatar
  • 199
4 votes
2 answers
1k 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 ...
user avatar
  • 155
0 votes
1 answer
218 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 ...
user avatar
1 vote
2 answers
993 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 ...
user avatar
  • 131
3 votes
1 answer
14k 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, ...
user avatar
1 vote
0 answers
30 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-...
user avatar
1 vote
1 answer
147 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 ...
user avatar
0 votes
1 answer
344 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'); ...
user avatar
  • 113
3 votes
1 answer
673 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 ...
user avatar
1 vote
0 answers
56 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. ...
user avatar
  • 111
1 vote
0 answers
554 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 ...
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 ...
user avatar
0 votes
0 answers
46 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 ...
user avatar
0 votes
1 answer
378 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 ...
user avatar
  • 159
3 votes
0 answers
487 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 /...
user avatar
0 votes
2 answers
203 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-...
user avatar
0 votes
0 answers
25 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 ...
user avatar
0 votes
2 answers
609 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 ...
user avatar
0 votes
0 answers
361 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 ...
user avatar
2 votes
1 answer
376 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 ...
user avatar
  • 123
0 votes
1 answer
29 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 ...
user avatar
  • 101
0 votes
1 answer
56 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 ...
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 ...
user avatar
  • 179
0 votes
0 answers
121 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/...
user avatar
  • 179
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 ...
user avatar
  • 101
0 votes
1 answer
133 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 ...
user avatar
1 vote
1 answer
38 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 ...
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):...
user avatar
5 votes
3 answers
8k 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 ...
user avatar
  • 225
2 votes
1 answer
969 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....
user avatar
  • 143
0 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 ...
user avatar
  • 143
2 votes
1 answer
488 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 ...
user avatar
  • 234
1 vote
0 answers
116 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 ...
user avatar
  • 111
2 votes
1 answer
174 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 ...
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 ...
user avatar
0 votes
2 answers
130 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 ...
user avatar
  • 307
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....
user avatar
  • 335
0 votes
2 answers
114 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/...
user avatar
  • 107
0 votes
1 answer
413 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.'/?$'...
user avatar
0 votes
1 answer
3k 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?
user avatar