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 information to my article. Let’s call that field tab-1. I don’t wan’t to show all this extra data immediately on the article page, but I want to … Read more

Send data through routing paths in Angular

Is there anyway to send data as parameter with router.navigate? I mean, something like this example, as you can see the route has a data parameter, but doing this it’s not working: this.router.navigate([“heroes”], {some-data: “othrData”}) because some-data is not a valid parameter. How can I do that? I don’t want to send the parameter with … Read more

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, ‘handler_mijnenergie’, array( ‘methods’ => ‘\WP_REST_Server::CREATABLE ‘, ‘callback’ => [ $this, ‘handle_energie_data’ ] ), false ); } ); When calling the namespace “/wp-json/watz/v1” I get a correct response in … Read more

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 routing behavior and instead just display that static example.html page. This looks so easy to me concept-wise but I can’t find … Read more

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 have an url structure like events/{event_slug}/registration events/{event_slug}/speakers events/{event_slug}/contactus With each URL displaying the information from each custom field, respectively. Is there … Read more

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 with / interference from the WordPress system (no themes, no styles, no javascript, etc) yet still have it located … Read more

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=mycustomerpath/hello which can be mapped to any function you like that returns a content that is “themed” into your theme layout. But in wp, i have no … Read more