I have this painful problem with a client. They need to load a feed from a remote endpoint into a page that fits their WordPress template design.. They also want to display the page at a particular URL

for example


I created the page that loads the feed and I am able to include header and footer,,

    define('WP_USE_THEMES', false);
//Contents of the body of your XHTML page go here
<?php get_footer(); ?>

BUT I don't know how to make the page a part of the WordPress URL schema?? Is there a way to accomplish this?

Also,, this page also displays "Page not found" in the title, for obvious reasons,, How can I override meta tags on such custom page that needs to live this awkwardly in the WordPress ecosystem.

Any suggestions in the right direction would be very very helpful!

2 Answers 2


You can create a WordPress template and then set your myclient.com/we-want-it-here page to use the template.

This way, you can still use get_header() and get_footer(), and include your custom code.

I hope this helps!

  • the point is to not have to create a page to assign it a slug,, it runs the risk of the page slug getting changed or deleted
    – GRowing
    Jun 19, 2018 at 0:07

I needed this too and it was as simple as:

add_filter('template_include', function ($template) {
    if (get_query_var('name') === 'we-want-it-here') {
        return get_stylesheet_directory() . 'path/to/my-standalone-page.php';

    return $template;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.