I have integrated my own custom PHP pages into amember v4 , but I want them to use the theme for rendering. I can't see any documentation on this, can someone tell me how to do this
I have gone through that section and created the template, what I want to know is how do I hook into the templates from my custom application page. So I have my_app.php under the members area, how do I call the template header etc. Do I have to import some PHP files or extend certain classes
Sorry, what do you want to hook into? Do you want to include aMember's header/footer around your custom page?
Look at this: PHP: require_once 'amember/bootstrap.php'; $t = new Am_View;$t->title = "test";$t->content = "My page between header and footer goes here!<br />";$t->display('layout.phtml');
I have tried this, but I get the following error I'm access http://domain/member/my-app.php In this file I use the code above to embed my content in the page, this works OK but the problem is with the JS inclusion <?php echo $this->_scriptJs('jquery-1.6.1.min.js'); ?> This returns a URL for the js file as http://domain/member/my-app.php/application/default/themes/mytheme/public/js/jquery-1.6.1.min.js This URL doesn't exist and the JS file is not loaded Do you know what the issue is
This code gave me errors too. The log file said "Route default is not defined". I'm new to aM 4. I've read the doc's related to Themes and Templates. I'm able to intergrate my amember pages with wordpress pretty easily. However, I'm unable to figure out how to apply my current wordpress theme with my custom php files that live outside of amember and wordpress. Can someone please share the code I can copy and past into my .php files. Thank you. BeeNet Code: require_once 'amember/bootstrap.php'; $t = new Am_View; $t->title = "test"; $t->content = "My page between header and footer goes here!<br />"; $t->display('layout.phtml');
I just learned that I can include the wordpress core in my custom file and use its build in function to output header and footer: <?php define("WP_CACHE", false); define("WP_USE_THEMES", false); include_once("/path/to/wp-blog-header.php"); get_header(); // WP function to output header //Your php code goes here get_footer(); // WP function to output footer