<?php
/*
Template Name: Full Width page
*/
?>

<?php get_header(); ?>

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

<div id="content" class="fullwidth">

    <div class="article">
    
    <h1><?php the_title(); ?></h1>
    
    <?php edit_post_link( 'EDIT', '<div class="post-info"><span class="date">', '</span></div>' ); ?>
    
	<?php 
    $content = get_the_content();
    $content = apply_filters( 'the_content', $content );
    $content = str_replace( ']]>', ']]&gt;', $content );
    $content = preg_replace( '|(class=[\'"]wp-caption.*?[\'"]).*?(style=[\'"](.*?)[\'"]).*?|i', '$1', $content );
    echo $content;
    ?>
    
    </div>
    
</div>

<?php endwhile; else: ?>

<div id="content">

    <div class="article">
    
    <h1><?php _e( "Error!", "sofa_shoppr" ); ?></h1>
    <div class="post-info">
        <span class="date"><?php _e( "Page not found", "sofa_shoppr" ); ?></span>
    </div>
    
    <p><?php _e( "The Page you are looking for doesn't exist!", "sofa_shoppr" ); ?></p>
    
    </div>
    
</div>
    
<?php endif; ?>

<?php get_footer(); ?>	   