-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-player-page.php
40 lines (31 loc) · 1.18 KB
/
single-player-page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
$post = $wp_query->get_queried_object();
$pagename = $post->post_name;
?>
<?php get_header(); ?>
<div id="wrapper">
<div id="pagecol" class='ajaxcol'>
<div class='page'>
<?php if ( have_posts() ) :
if( file_exists( dirname( __FILE__ ) . '/player-pages/' . $pagename . '.php' ) ) :
get_template_part( 'player-pages/' . $pagename );
else :
while ( have_posts() ) : the_post(); ?>
<header>
<h2><?php the_title(); ?></h2>
<?php get_template_part( 'snippets/playerPage', 'menu' ) ?>
</header>
<?php get_template_part( 'snippets/playerPage', 'flashMessages' ) ?>
<?php the_content(); ?>
<?php endwhile;
?>
<?php endif; ?>
<?php else : ?>
<h2>Nothing Found</h2>
<p>Sorry, but the content you are looking for isn't here...</p>
<p><a href="<?php echo get_option('home'); ?>">Return to the homepage</a></p>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>