WordPress index.php and category page

i editing my custom theme and when i adjust my index.php the category page adjust also. do i have wrong in my page.php thats why its not running properly?

here is my page.php

    <?php get_header()?>
<?php get_sidebar()?>
    <div class="col-sm-9">
        <?php while(have_posts()): the_post()?>

            <h3><?php the_title()?></h3>
            <p>Posted: <?php the_time(); ?> of <?php the_date(); ?></p>
            <?php the_content();?>
            <p><?php the_tags(); ?></p>

        <?php endwhile;?>
    </div>

<?php get_footer()?>

and this is my index.php

<?php get_header()?>
<?php get_sidebar()?>
    <div class="col-sm-9" id="index-posts">

        <?php while(have_posts()): the_post()?>

            <h3><a href="<?php the_permalink()?>"><?php the_title()?></a></h3>              
            <?php the_content( 'Read more ...' ); ?>
            <br/><br/>
        <?php endwhile;?>
    </div>

<?php get_footer()?>

Read more here: WordPress index.php and category page

Leave a Reply

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