Single product and single page
Up to this point we've done pretty well. We have our main post page or our homepage done, but if I click on one of these and we go to the single product page, it doesn't look too good. We're also missing a bunch of information.
So we'll now create a new file inside the MyShop
theme folder and save it as single.php
. After creating this file if we go back to the single view and reload, it'll be blank because it's looking at the single file. So what we'll do is copy everything we have in the index
page.
So we'll grab all of it, we'll paste it in, and get rid of the showcase
part because we don't want that. We want the showcase on the homepage only. We'll put an hr
tag in there.
We'll do the same thing as far as checking for posts and looping through the post even though it's a single post as we did in the previous section. But we'll get rid of everything that's in between the while
loop:
<?php while(have_posts()) : the_post(); ?> <div class="row single...