How to integrate WordPress template with CodeIgniter

前端 未结 5 2128
孤独总比滥情好
孤独总比滥情好 2020-11-28 21:37

How can CodeIgniter and WordPress be integrated such that the look and feel/template of the WordPress blog is carried over to the CodeIgniter-created pages?

5条回答
  •  眼角桃花
    2020-11-28 22:26

    First step is to move CodeIgniter and the WordPress files in their own directory.

    After that, put the following line at the top of your CodeIgniter's index.php file. Change the path to wp-blog-header.php as needed to point to your WordPress's root directory.

    Then, you can use the following functions inside your views:

    
    

    Other helper functions can also be found in WordPress's documentation which can assist you in integrating the design.

提交回复
热议问题