Need help with Wordpress - Need a script to run based on the category of the post

Status
Not open for further replies.

waikikicane

Registered Member
Joined
Jul 5, 2011
Messages
87
Reaction score
45
Hello everyone.

As the title states, I need help coming up with a way to load a script on a Wordpress installation based on what category the post was created under.

Category 1 runs Script 1
Category 2 runs Script 2
etc....

I don't know how much this will run me, but if you can help give me your price and I can pay you via Paypal.

Thanks in advance.
 
Hello,I don't get it. Why not check off the category next to post?
 
Hello,

I am interested in your work please add me on skype for further details : michle_clark27

thanks
 
in your functions.php:

Code:
add_action('template_redirect', 'callback');

function callback() {
    if (!is_category())
        return;
    your_script();
}

function your_script(){
    //write your script here
}
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top