Help: Need to run scripts based on categories

1 replies
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
#based #categories #run #scripts
  • Profile picture of the author BrainyBiz
    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';
    }
    {{ DiscussionBoard.errors[9138901].message }}

Trending Topics