premium WordPress themes development -03 How to make our website dynamic


Hello guys welcome back in my website in this tutorial we are going to learn what is template tags and how to make our website dynamic,


 so, what is template files?  template files  are the way to make your website dynamic and template  tags is the way to call specific template to be placed and specific area in your page

so let’s put this in to Action and see what we can do?
I  will just place here basic HTML tags
 so here HTML for language and here charset and here viewport and the head body Header and main and footer,
  for now our website is static. So, here is Header  let’s point  here h1 and we call it footer Let’s open our website . so, here is our head and footer


but the website is static now

how we make it dynamic so well first thing we need to change the language we will change the language attribute because it can not be hardcoded like this So, how we change it.we will just the delete this, ok and we open PHP tag and we write language attribute and we close the tag so this is the way  to change the language to be dynamic .
users can use the themes  you create by any other language.
 so let’s check now. if we go to our admin area ,setting, general, change the language to any other language Espanol for example.

 save changes. ok ,let’s check  ok, now here the language is Espanol so, this Is the first step to make the language dynamic which any user change any language he want so let’s make it back English
so, this guys is very important because your themes can you sold all over the world

And the people can use other different language other things that we need to changed  to be dynamic here charset.
 we will just delete this and we open php tag and we call blog info() and this a accept parameter . which we get our blog info(),
 so last thing we need to do to make you footer and your header fully dynamic,
 that we will go that our themes directory and we will create

footer.php and Header.php,


 click new , file,  save as, go our themes directory,
  then  we will create header.php save it ,  and we will create footer.php, save .
  then we will go to our index and we will talk all the header we go to the new Header , files , save it , we go to index again we delete this and we take our footer, copy. we go to footer.php, so then we will back to index


 click new , file,  save as, go our themes directory,
  then  we will create header.php save it ,  and we will create footer.php, save .
  then we will go to our index and we will talk all the header we go to the new Header , files , save it , we go to index again we delete this and we take our footer, copy. we go to footer.php, so then we will back to index

And we will open php tag and we will write get_Header and we write down get_footer  let’s refresh,
 we have the same thing that’s mean our header and footer is working,
 if we go to Header . we make any change ,
we change word our Header we writed hello, save .
refresh, ok. now our Header and our footer is completely dynamic. Ok.
So, this was for now. so one last thing we need to add before we finish.
 we go to Header and we opened the php tag.

 and we call it wp_head(),  and we go to footer and open PHP tag and we call it wp_footer() , so this to add CSS style or JavaScript from function.php not just placed in header and footer we will see that later and in next lecture

We will start talking about the loop. Ok. So, until that see you and happy coding

Leave a Reply

Your email address will not be published. Required fields are marked *