Set custom content-type and custom response with custom route using WordPress
-
if a user visits a URL like
https://example.com/customsvg/:name
, then site want to return a custom generated SVG file with dynamic content like<svg xmlns="https://www.w3.org/2000/svg" height="90" width="200"> <text x="10" y="20" style="fill:red;">Hello <tspan x="10" y="45">{{name}}</tspan> </text> </svg>
ie, I want to set content-type as image/svg+xml for custom route with auto generated content.
is it possible?
How?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Set custom content-type and custom response with custom route using WordPress’ is closed to new replies.