Wordpress menu in Codeigniter controller -
i try call codeigniter controller outside of box wordpress blog menu, following error
fatal error: cannot redeclare site_url() (previously declared in /../system/helpers/url_helper.php:53) public function getwordpressmenu() { ini_set('display_startup_errors', 1); ini_set('display_errors', 1); error_reporting(-1); // no theme output define('wp_use_themes', false); // initializes entire wordpress require $_server['document_root'] . 'blog/wp-blog-header.php'; wp_nav_menu('your_theme_menu_location'); }
i know both of frameworks have same function there way disable on of inside of controller?
in codeigniter can replace helpers creating new file @ application/helpers
in case, can create new file @ application/helpers name url_helper.php
just copy url_helper.php folder system/helpers , copy application/helpers/ . open file url_helper.php , rename function url_helper else, example: ci_site_url
Comments
Post a Comment