0

I followed the directions at http://blog.frontendfactory.com/how-to-create-front-end-page-from-your-wordpress-plugin/ and it works but the header and footer do not load.

Here is my page: http://pocket.consulting/bg-core/

UPDATE: I stand corrected... It appears the wp_head(); and wp_footer(); do load as it is altering the color, font, etc. Is there something else I have to call to get the entire look/feel?

  • 1
    this seems to be for me a strange way of setting a front end page. usually I show data on a page with shortcodes : codex.wordpress.org/Function_Reference/add_shortcode – mmm Aug 24 '17 at 20:55
  • @mmm - My ultimate goal is to be able to have the page created by the plugin and then have php code created by the plugin execute in the frontend. – G-J Aug 24 '17 at 21:06
  • the included file is a very light template then if you want that this looks like other page, try to load page.php of the theme e.g. with the help of codex.wordpress.org/Function_Reference/get_page_template – mmm Aug 24 '17 at 21:25
  • in the article, the first step is to create a page then it's not what you want, is it ? – mmm Aug 24 '17 at 21:26
  • Your themes headers etc don't show because there is nothing to make them show in the template that tutorial gives you. You'd have to copy paste all the stuff out into it, there's no quick function call that will do the trick. But really, shortcodes are the easiest most foolproof approach to putting arbitrary PHP on a page, that's why they were created – Tom J Nowell Aug 24 '17 at 21:29
0

If you are trying to get things like the menu and footer, replace wp_head() and wp_footer() with:

get_header();

and

get_footer();

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.