Support » Plugin: WP Custom HTML Page » Setting custom header

  • Resolved lworkmanregroove


    Hey there,

    Great plugin! I’m looking to change the HTTP header of the custom page I’m serving and wondering how to do that.

    Right now, I’m serving a .json file to verify I own the domain, but I need to have the response use the proper content type.

    More than comfortable going in and editing something, just looking for some guidance.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author kr4ft3r



    try editing WPCHTMLP_permalink_handler function. You’ll find output echo at the bottom, have this somehow added before the output:

    header(‘Content-Type: application/json’);
    //..and any other headers you would need

    But you probably want to check the end of $query_uri string for “.json” first before calling those header functions.

    That worked a treat! Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.