I needed to insert data from app database to the wordpress blog. So I came up with the following setup, where I used CodeIgniter as a theme to the WordPress.

localhost
 -myProject(WordPress)
  -wp-content
   -themes
    -myTheme(CodeIgniter)
     -application
      -modules
       -forums
        -controllers
         -Forums.php
        -views
         -forums_view.php

Now if we call Forums then the Forums.php controller’s index function catches the call, but if we call Forums/forum/something then the Forums.php controller’s forum function does not catch the call.

This is all the routings I tried but nothing worked, every time whenever there is one or more levels to the uri the page lands up on error_404 page.

$route['(?i)Forums/forum/(:any)'] = 'Forums/forum/$1';
$route['(?i)forums/forum/(:any)'] = 'forums/forum/$1';
$route['(?i)forums/forum/(:any)/(:any)'] = 'forums/forum/$1';
$route['(?i)forums/forum/(:any)/(:any)/(:any)'] = 'forums/forum/$1';
$route['(?i)forums/forum/(:any)/(:any)/(:any)/(:any)'] = 'forums/forum/$1';

Read more here: Codeigniter with WordPress routing


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: