The tag has no usage guidance.

learn more… | top users | synonyms

4
votes
1answer
7k 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=...
2
votes
1answer
843 views

Custom routing for plugins

I am making a plugin that needs a page that can be accessed from the outside, pretty much like an API, and have the url like so, http://xxxxx/custom_method?parameter=xxxxx&something=xxxx is ...
2
votes
1answer
1k views

Debugging WP routing

For some posts, I see 404 page, even though posts exist, where is the place in WP where using permalink is decided what object needs to rendered? Thanks!
2
votes
1answer
129 views

In wordpress I am manipulation 404 response. I want to give the response before 404 error is given to google

May be the question in title is not explaining what exactly I want. So I will explain one logic and then ask what problem I am getting from that. We are using wordpress. We have 2 categories Option1(...
2
votes
1answer
134 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 ...
2
votes
1answer
450 views

Custom post type routing with hierarchy

I've been playing around with a lot of custom post types lately and I am pretty anal about my URL structure / routing. An issue I ran in to a with a site that I just developed was this: I had many ...
2
votes
1answer
288 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 ...
2
votes
1answer
67 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?
2
votes
2answers
146 views

How to display non-page / post content

I have a custom made Twitter stream on my site. I want to have a permalink for each tweet which would go to a page which would display only the tweet - no other content - surrounded by my custom ...
1
vote
2answers
594 views

Multiple templates for a custom post type

As new user to wordpress I'm finding that the preset templates structure a little restricting coming from the flexibility of other template routed CMS I've worked with. Saying this, I know there are ...
1
vote
3answers
2k views

wordpress - load a template based on the URI

I have a number of custom of post types - i.e. 'windows', 'doors', 'garages' and I want to load a custom template (special.php) whenever my wordpress site has a url that looks like this: www.mysite....
1
vote
2answers
123 views

RSS feed for deleted posts and comments

I need to create a feed (RSS or Atom) of posts and comments that have been deleted (ie moved to Trash). What's the best way of doing this? Right now I'm thinking about creating 2 pages templates ...
1
vote
2answers
48 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
88 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....
1
vote
0answers
29 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 ...
1
vote
0answers
108 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 arhive etc in part, or to use ...
1
vote
0answers
407 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
2answers
33 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
2answers
53 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
109 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?
0
votes
1answer
286 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
156 views

Wordpress plugin url for form submit

I am creating a custom plugin that has dynamic forms and I wanted to ask on how I can create a dynamic form action url. Example is Contact Form 7, how did cf7 create the form action url without ...
0
votes
1answer
31 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
218 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
2answers
123 views

wordpress url correction

I have my wordpress site in a root folder like this "www.mysite/myblog/" so to get to the blog you have to go to "www.mysite/myblog/" I'm wanting to make it so that a user can go to "www.mysite" and ...
0
votes
1answer
362 views

WP Multisite - How to create a custom “router” for blog prefixes?

I'm trying to create a custom route for a WP Mutlisite network. If you're familiar with WPMS, you know that the db tables for each blog on the network begin with something like {prefix}_2_. Normally, ...
0
votes
1answer
71 views

One Page or Post, n Slugs

What would be the best option for serving up a page for any one of many slugs. Suppose I have the following: example.com/the-broken-slug example.com/thebrokenslug example.com/broken-slug example.com/...
0
votes
1answer
55 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 ...
0
votes
0answers
30 views

Disabling /blog route

I have multiple sites, with one nested within the other. Parent WordPress site folder location : /html Nested Wordpress site folder location: /html/blog Whenever I view a post from the /html/blog ...
0
votes
1answer
261 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
1answer
300 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
1answer
187 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
227 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 ...
0
votes
1answer
444 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
375 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
151 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
295 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 ...
0
votes
1answer
294 views

Get permalink for a post from inside Wordpress and route to a related site

I built a mobile version of a wordpress site and added some PHP code in the wordpress index.php file to detect mobile users and HTTP-redirects them to m.website.com (which is not a wordpress ...