Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <header class="xf__header">
- <div class="content xf__container">
- <?php //exemple ici
- switch (the_title()) {
- case "Home":
- $img = 438; //id de l'image upload
- break;
- }
- $image_attributes = wp_get_attachment_image_src( $img );
- if ( $image_attributes ) : ?>
- <img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>" />
- <?php endif; // fin ici ?>
- <?php the_title( '<h1 class="xf__page-title" itemprop="headline">', '</h1>' ); ?>
- </div>
- <?php
- /**
- * Featured Image
- */
- get_template_part( 'template-parts/featured-image-page' ); ?>
- </header>
- <main class="xf__main" itemprop="mainContentOfPage">
- <?php while ( have_posts() ) : the_post(); ?>
- <div itemscope="itemscope" itemtype="http://schema.org/CreativeWork">
- <?php
- /**
- * Page Content
- */
- get_template_part( 'template-parts/content-page' ); ?>
- <?php
- /**
- * Comments and Form
- */
- comments_template(); ?>
- </div>
- <?php endwhile; ?>
- </main>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement