Help: Need to run scripts based on categories

by 1 replies
1
I need to find a way to load scripts based by category.

For example a post in category&tag_ID=776 would run script A

While a post in category&tag_ID=433 would run script B

And so forth.

Any idea how this can coded?

Thanks in advance
#programming #based #categories #run #scripts
  • Using PHP you could do something like this:

    Code:
    if ($_GET['category'] == "THE CATEGORY" && $_GET['tag_ID'] == 776) {
        include 'path/to/script_a.php';
    }elseif ($_GET['category'] == "THE CATEGORY" && $_GET['tag_ID'] == 433) {
        include 'path/to/script_b.php';
    }

Next Topics on Trending Feed