Why is same CSS inside same php file is enforced 2 different ways?
I do not have an archive.php page, so my index.php doubles as the archive template. Also, I created a search.php page that is identical to the index.php except it says “Search Results..” at the top.
My question is that the index.php page enforces the <div class=”entry entry-1″ while when called as an archive, or when duplicated in search.php, this <div> class does nothing, yet I can remove the class call altogether and it clearly effects the format, so somehow there is something going on in the php code to tell the page that it is indeed an index only that is being called to enact the <div> class:
<?php get_header(); ?>
<?php if (have_posts()) :?>
<?php $postCount=0; ?>
<?php while (have_posts()) : the_post();?>
<div class=”entry entry-1″>
Any idea why that <div class=”entry entry-1″> only actually shows the class when viewed as an index? The archive page understands and utilizes all the postCount stuff too, just doesn’t behave the “entry entry-1” class. Very confused on this one.
- The topic ‘Why is same CSS inside same php file is enforced 2 different ways?’ is closed to new replies.