Working on index.php for the content post

To simplify the index.php file, open the file in the editor and get rid of all the code present in it except the <?php get_header(); ?> and <?php get_footer(); ?> lines. This is how our index.php will look like:

<?php get_header(); ?>

<?php get_footer(); ?>

We will then check for posts and if there are posts, loop through them and spit out the correct content file. Now, we will add <?php if(have_posts()) : ?> and then we'll use the shorthand syntax as shown here:

<?php get_header(); ?>
<?php if(have_posts()) : ?>
<?php endif; ?>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.135.175