Need to know how to include a .php file inside a php include call
I would like to include a sidebar.php file based in the category name. The file is the same name as the category. How do I call the file in the PHP include() code so that it grabs the current category name?
I’ve tried something like
<?php include(‘<?php the_category(‘ ‘) ?>.php’); ?>
but it didn’t work.
- The topic ‘Need to know how to include a .php file inside a php include call’ is closed to new replies.