• my current code is this:

    <?php
    if ($_SERVER[‘QUERY_STRING’]== “attachment_id=144”)
    {echo do_shortcode(‘[gallery ids="144,143,133,126,127,125,132,130,128"]‘);
    }
    else{echo do_shortcode(‘[gallery ids="243,247,250,249,245,241,246,248,244"]‘);}
    ?>

    Basically how do i make it say if query string = “attachment_id=144” or “attachment_id143” or “attachment_id etc.” do this. The code I have works for that one particular attachment but I can’t figure out how to write in more than one.

Viewing 1 replies (of 1 total)
  • Something like this??

    if (in_array ($_GET ['attachment_id'], array (144,143,133,126,127,125,132,130,128)) {
        echo do_shortcode('[gallery ids="144,143,133,126,127,125,132,130,128"]');
    }
    else {
        echo do_shortcode('[gallery ids="243,247,250,249,245,241,246,248,244"]');
    }
Viewing 1 replies (of 1 total)

The topic ‘Make $_SERVER['QUERY_STRING'] specify more than one query string’ is closed to new replies.