1

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

myclient.com/we-want-it-here

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

<?php
    define('WP_USE_THEMES', false);
    require('path/to/my-wordpress-dir/wp-blog-header.php');
    get_header();
?>
//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!

0

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 '18 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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