S:\beseit\wp-content\themes\twentyeleven/page-maxima-amplada.php
<?php
/*
Template Name: maxima amplada
Description: Plantilla de pàgina sense barres laterals, màxima amplada possible.
*/
add_action('wp', function() {
if ( did_action('template_redirect') ) return;
// Exemples (descomenta/adapta segons tema):
// remove_action('storefront_sidebar', 'storefront_get_sidebar', 10);
});
get_header(); ?>
<style type="text/css">
.page-maxima-amplada-fullwidth,
.page-maxima-amplada-fullwidth .content,
.page-maxima-amplada-fullwidth .site-content {
width: 100% !important;
max-width: none !important;
padding-left: 0 !important;
padding-right: 0 !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
.sidebar, .widget-area, .site-sidebar, #secondary {
display: none !important;
}
.page-maxima-amplada-inner {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.page-maxima-amplada-inner .entry-title {
margin: 20px 0 10px 20px;
text-align: left;
}
.page-maxima-amplada-inner .entry-meta {
margin: 0 0 30px 20px;
font-size: 0.9rem;
color: #666;
font-style: italic;
}
</style>
<div id="primary" class="content-area page-maxima-amplada-fullwidth">
<main id="main" class="site-main page-maxima-amplada-inner" role="main">
<?php
while ( have_posts() ) : the_post();
echo '<h1 class="entry-title">' . get_the_title() . '</h1>';
echo '<div class="entry-meta">Publicat el ' . get_the_date('j F Y') . '</div>';
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer();
?>