Support » Plugins » PHP in Categories

  • Does anyone know of a good way that I can do a php include in each of my category description boxes?

    If not, can someone give me the php code to put in the archive.php file that basically says, “IF category ID equals 1, include this file. IF category ID equals 2, include this file, etc…”?


Viewing 1 replies (of 1 total)
  • You could try this :

    include ‘/path/to/category-‘ . $wp_query->get(‘cat’) . ‘.php’;

    It will include “/path/to/category-1.php” for category ID 1, “/path/to/category-2.php” for category ID 2, etc…

Viewing 1 replies (of 1 total)
  • The topic ‘PHP in Categories’ is closed to new replies.