Last active
January 3, 2016 10:59
-
-
Save Rahe/8453092 to your computer and use it in GitHub Desktop.
Theme webschool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div id="main" role="main" class="mod pam"> | |
<h4>Page d'accueil</h4> | |
<div class="grid" > | |
<div class="grid4"> | |
<?php | |
if ( have_posts() ) while ( have_posts() ) : the_post(); | |
?> | |
<div> | |
<?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?> | |
<div class="mod" > | |
<h4><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h4> | |
<?php the_excerpt(); ?> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
<?php | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer | |
echo paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
'format' => '?paged=%#%', | |
'current' => max( 1, get_query_var('paged') ), | |
'total' => $wp_query->max_num_pages | |
) ); | |
?> | |
</div> | |
</div> | |
</div> | |
<?php get_footer(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function twentyfourteen_setup() { | |
// Enable support for Post Thumbnails, and declare two sizes. | |
add_theme_support( 'post-thumbnails' ); | |
// This theme uses wp_nav_menu() in two locations. | |
register_nav_menus( array( | |
'primary' => 'Menu principal', | |
) ); | |
} | |
add_action( 'after_setup_theme', 'twentyfourteen_setup' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if lte IE 7]> <html class="no-js ie67 ie678" lang="fr"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 ie678" lang="fr"> <![endif]--> | |
<!--[if IE 9]> <html class="no-js ie9" lang="fr"> <![endif]--> | |
<!--[if gt IE 9]> <!--><html class="no-js" lang="fr"> <!--<![endif]--> | |
<head> | |
<meta charset="UTF-8"> | |
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> | |
<title>Front page</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!--[if lt IE 9]> | |
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/knacss.css" media="all"> | |
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/styles.css" media="all"> | |
<?php wp_head(); ?> | |
</head> | |
<body> | |
<div class="center w70"> | |
<header id="header" role="banner" class="line pam"> | |
<h1><a href="<?php echo home_url( '/' ) ?>" ><?php bloginfo( 'name' ); ?></a></h1> | |
<div class="menu"> | |
<ul> | |
<li class="page_item page-item-id-de-la-page"> | |
<a href="#">Accueil</a> | |
</li> | |
<li class="menu-item-has-children"> | |
<a href="#">Page 2</a> | |
<ul class="sub-menu"> | |
<li id="menu-item-23"><a href="#">Sous élément</a></li> | |
<li id="menu-item-24"><a href="#">Sous élément 2</a></li> | |
</ul> | |
</li> | |
<li class="page_item page-item-3 current-menu-item"> | |
<a href="#">Page 3</a> | |
</li> | |
</ul> | |
</div> | |
<div class="center txtcenter"> | |
<img src="http://3.bp.blogspot.com/-nv9Tg9_bce8/TeITNI35kyI/AAAAAAAACFE/9A14vdVmFCM/s1600/Cinemur.jpg"> | |
<div><?php bloginfo( 'description' ); ?></div> | |
</div> | |
</header> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div id="main" role="main" class="mod pam"> | |
<h4>Page d'accueil</h4> | |
<div class="grid" > | |
<div class="grid4"> | |
<?php | |
$latest_movies = new WP_Query( array( 'post_type' => 'film', 'showposts' => 4 ) ); | |
if ( $latest_movies->have_posts() ) while ( $latest_movies->have_posts() ) : $latest_movies->the_post(); | |
?> | |
<div> | |
<?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?> | |
<div class="mod" > | |
<h4><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h4> | |
<?php the_excerpt(); ?> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
</div> | |
</div> | |
<p class="mod txtcenter"> | |
<a href="<?php echo get_post_type_archive_link( 'film'); ?> " class="center" >Voir les autres films</a> | |
</p> | |
</div> | |
<?php get_footer(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php if ( have_posts( ) ) while (have_posts() ) : the_post(); ?> | |
<div id="main" role="main" class="mod pam"> | |
<h2><?php the_title(); ?></h2> | |
<h3>Durée : <?php the_field( 'duree' ); ?> minutes</h3> | |
<div> | |
<?php if ( has_post_thumbnail() ) the_post_thumbnail( 'large' ); ?> | |
<div class="mod" > | |
<?php the_content(); ?> | |
<?php | |
$producteur = get_field( 'producteur' ); | |
if ( !empty( $producteur ) ) : ?> | |
<p>Producteur : <?php echo $producteur; ?> </p> | |
<?php endif; ?> | |
<p>Date de sortie : <?php the_field( 'date_de_sortie' ); ?> </p> | |
<p><a href="<?php the_field( 'bande_annonce' ); ?>" target="_blank">Voir la bande annonce</a></p> | |
</div> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
<?php get_footer(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div id="main" role="main" class="mod pam"> | |
<h4><?php single_term_title( 'Les films :' ); ?></h4> | |
<div class="grid" > | |
<div class="grid4"> | |
<?php | |
if ( have_posts() ) while ( have_posts() ) : the_post(); | |
?> | |
<div> | |
<?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?> | |
<div class="mod" > | |
<h4><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h4> | |
<?php the_excerpt(); ?> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
<?php | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer | |
echo paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
'format' => '?paged=%#%', | |
'current' => max( 1, get_query_var('paged') ), | |
'total' => $wp_query->max_num_pages | |
) ); | |
?> | |
</div> | |
</div> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment