Driving me CRAZY :(
-
I have a very basic function that echoes the Category ID
<?php function get_cat_id_now() { $category = get_the_category(); $thecatid = $category[0]->cat_ID; echo $thecatid; } ?>
and then, I want to use the include function together with the get_cat_id_now function.
Like this:
<?php include("/related/".get_cat_id_now().".html"); ?>
But it doesn’t work.
How do I add theget_cat_id_now()
correctly into theinclude(/related/function_goes_here.html")
?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Driving me CRAZY :(’ is closed to new replies.