setting the pin for arduino mux shield

can u teach me how to change my pin in my codes using mux shield.i dont know how to put my lcd pin in my program

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}

int a = 0, h = 0, m = 1, s = 30;

void loop() {
lcd.setCursor(0,0);
lcd.print("digital clock");
lcd.setCursor(2,1);
lcd.print (":");
lcd.setCursor(5,1);
lcd.print(":");

for (a; a < 2; a++)
{
lcd.setCursor(8, 1);
if (a==0)
lcd.print("am");
else lcd.print("pm");
for(h; h < 12; h++)
{
lcd.setCursor(0,1);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(h);
for(m; m < 60; m++)
{
lcd.setCursor(3,1);
lcd.print(" ");
lcd.setCursor(3,1);
lcd.print(m);
for(s; s < 60; s++)
{
lcd.setCursor(6,1);
lcd.print(" ");
lcd.setCursor(6,1);
lcd.print(s);
delay(998);
}
s=0;
}
m=0;
}
h=0;
}
}

Your use of for loops is unconventional, to say the least. You should remove the line that declares all the index variables. They should be declared and initialized in the for statements.

for(int a=0; a<2; a++)
{
}

Declaring the variables in one place, using them in another, and (re)initializing them in a third place is error-prone. Declare, initialize, and use them all in one place.

What mux shield? What are you trying to multiplex? Not the LCD pins, surely. Nothing in that code requires a multiplexer.

i will put the pin of my lcd in mux shield cause i have many sensor to be used for my smart window project thats why i bought mux shield..so how will i change my code when i put the 6pin of my lcd into Mo or on the FIRST multiplexer.

I don't think you can multiplex the LCD. You'll have a far easier time multiplexing the sensors.

if i used the pin 2-7 in digital can i still used the first multiplexer and the 2nd and third multiplexer?