Searching...
Wednesday 19 October 2016

Adding the Loop to the index php File in wordPress Theme



Before we go in at the Loop for index. PHP file let's go and get the extra Market that comes after the closing of the header and before the opening of the footer if we come back into our index. HTML file we could see that after the header tag closes there's a section class or another class with the columns and in this case a leader class for portfolio listing we have a slightly different Market for now we'll just copy the section come in and paste this into our index. HTML however when we come over and look at our site we can see that this doesn't look quite right the reason for this lies in the function stop PHP file and a few errors that we had been earlier that we didn't get to really see you in effect until now the first one is that the foundation file I had written an S at the end when it should be no us if we refresh the page we can see that this automatically starts to look better the second isn't the normalize file we can see that we have given it the same name as the Google font file so if we renamed it Google Google fonts yourself that should differentiate these two we could see the file change slightly however this doesn't look quite the same as it should in our example template the reason is for this normalize.css file that you only really need if you plan on making further customization's on the theme and want to normalize some of the Styles and font sizes so if we comment that out and we refresh it we could see that it's now starting to look more like the template file that we had to start with now that we have that correct we can come back into our index. PHP file and add in our room with our Dynamic content we're going to come back to the loop page and will copy the opening and then copy the closing and then we could think about where would be the best place to place this code for example we could see that if there are forced to run it will output this entire section if there aren't then it will only output with paragraph time however we don't want that entire section to be missing two better idea is to take this and drop it just where we need the content specifically to display

0 comments:

Post a Comment