prestacar Posted July 22, 2015 Share Posted July 22, 2015 (edited) Hello, I just would like to add the Prestahop's header and footer to my Wordpress blog (situated in my_site/blog). I've read many things about that, which may work with other themes that Twenty Fifteen, such as (in header.php)... <?php require_once(dirname(__FILE__).’/../../../../config/config.inc.php’); require_once(dirname(__FILE__).’/../../../../header.php’); ?> ... or (footer.php) ... <?php require_once(dirname(__FILE__).’/../../../../config/config.inc.php’); require_once(dirname(__FILE__).’/../../../../footer.php’); ?> ... or (header.php)... require_once(dirname(__FILE__).’/../../../../config/config.inc.php’); $controller = new FrontController(); $controller->displayHeader(); ... but that doesn't work with my theme. What should I do please? Thanks a lot, Edited July 22, 2015 by prestacar (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted July 22, 2015 Share Posted July 22, 2015 Prestashop doesn't use those files, unless you created them from scratch, they are deprecated.it might be more complex than you think, as you'll have to fetch header.tpl and footer.tpl, which are located in the theme folder. That given, you'd also have to process hooks.I'd create custom files for that. Link to comment Share on other sites More sharing options...
prestacar Posted July 24, 2015 Author Share Posted July 24, 2015 (edited) Thanks for your quick answer. I hope this could be usefull : So, I've added those lines to index.php ... require_once(dirname(__FILE__).'/../../../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../../../header.php'); ... and added at the end if the file... <?php $controller->displayFooter(); ?> ... and I also changed ... if ( is_front_page() && is_home() ) : ?> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <?php else : ?> <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> <?php endif; ... to custom lines ... if ( is_front_page() && is_home() ) : ?> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a></h1> <?php else : ?> <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a></p> <?php endif The page displays now Prestashop header and footer, with some bugs for the left sidebar and a footer using 100% of the page width. I have to enhance that. I hope I would be able to do. Edited July 24, 2015 by prestacar (see edit history) Link to comment Share on other sites More sharing options...
kiteman Posted September 25, 2015 Share Posted September 25, 2015 Hi Prestacar, I've seen that you've been able to integrate your wordpress in PS 1.6. I'm trying to do so but I get a blank page. Could you show me please the content of your index.php file in WordpressThank you Link to comment Share on other sites More sharing options...
kiteman Posted September 26, 2015 Share Posted September 26, 2015 Hi Prestacar, I've seen that you've been able to integrate your wordpress in PS 1.6. I'm trying to do so but I get a blank page. Could you show me please the content of your index.php file in Wordpress Thank you Hello, I found the issue was one of my modules Link to comment Share on other sites More sharing options...
Szed Posted February 11, 2016 Share Posted February 11, 2016 Curious on how to do it ! I work with PS and WP latest version and blank theme, just for try. My PS is in a shop/ folder, inside the WP. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now