Title: Newbie php question
Last modified: August 19, 2016

---

# Newbie php question

 *  Resolved [stipto](https://wordpress.org/support/users/stipto/)
 * (@stipto)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/newbie-php-question-1/)
 * 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.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [static text](https://wordpress.org/support/topic-tag/static-text/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [stipto](https://wordpress.org/support/users/stipto/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/newbie-php-question-1/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
