• Resolved stipto

    (@stipto)


    Hey there,

    I have the following code, displaying the body of my front page:

    <?php get_header(); ?>
    		 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    				<h2 class='fn control_title'>
    					<?php
    						if( function_exists( 'wpec_dd_price' ) )  {
    							wpec_dd_price( get_the_ID(), 'deal' ); ?> for
    					<?php }  ?>
    					<?php the_title();?>
    				</h2>
    					<div class='primary'>
    						<?php
    							get_sidebar();
    						?>
    					</div>
                    <?php the_content(); ?>
             <?php endwhile; endif; ?>
    <?php get_footer(); ?>

    I want to customize this a bit by adding some static text in a div with a class, above my main content. The way I did it works fine in firefox, but not in other browsers… (The div with class “cleardiv” is to clear float:left)
    Here’s what I did:

    <?php get_header(); ?>
    		 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                   <div align="center">
    <div class="mycustomclass"><h1>Custom Heading</h1><br />
    				<h3>Custom subheading with a <a href="/contact">link</a></h3>
    				</div></div>
    <div class="cleardiv"></div>
    <hr>
    				<h2 class='fn control_title'>
    					<?php
    						if( function_exists( 'wpec_dd_price' ) )  {
    							wpec_dd_price( get_the_ID(), 'deal' ); ?> for
    					<?php }  ?>
    					<?php the_title();?>
    				</h2>
    					<div class='primary'>
    						<?php
    							get_sidebar();
    						?>
    					</div>
                    <?php the_content(); ?>
             <?php endwhile; endif; ?>
    <?php get_footer(); ?>

    Anyone know what I did wrong?

    Edit: This was a Cache issue with the other browsers, I did the right thing. So issue = solved.

  • The topic ‘Newbie php question’ is closed to new replies.