...
 
Commits (2)
...@@ -69,6 +69,8 @@ class grund_theme ...@@ -69,6 +69,8 @@ class grund_theme
{ {
if ( ! $layout ) if ( ! $layout )
$layout = $this->the_query->get( 'layout' ); $layout = $this->the_query->get( 'layout' );
else
$this->the_query->set( 'layout', $layout );
get_template_part( 'layout/layout', $layout ); get_template_part( 'layout/layout', $layout );
} }
...@@ -79,15 +81,23 @@ class grund_theme ...@@ -79,15 +81,23 @@ class grund_theme
$view = $this->the_query->get( 'view' ); $view = $this->the_query->get( 'view' );
if ( $view == 'listing' || $this->the_query->is_archive() || $this->the_query->is_home() ) if ( $view == 'listing' || $this->the_query->is_archive() || $this->the_query->is_home() )
{
$this->the_query->set( 'view', 'listing' );
$this->listing(); $this->listing();
}
else else
{
$this->the_query->set( 'view', 'detail' );
$this->detail(); $this->detail();
} }
}
function listing( $listing = null ) function listing( $listing = null )
{ {
if ( ! $listing ) if ( ! $listing )
$listing = $this->the_query->get( 'listing' ); $listing = $this->the_query->get( 'listing' );
else
$this->the_query->set( 'listing', $listing );
get_template_part( 'listing/listing', $listing ); get_template_part( 'listing/listing', $listing );
} }
...@@ -111,6 +121,8 @@ class grund_theme ...@@ -111,6 +121,8 @@ class grund_theme
if ( ! $listed ) if ( ! $listed )
$listed = $this->the_query->get( 'listed', $post->post_type ); $listed = $this->the_query->get( 'listed', $post->post_type );
else
$this->the_query->set( 'listed', $listed );
get_template_part( 'listed/listed', $listed ); get_template_part( 'listed/listed', $listed );
} }
...@@ -142,6 +154,8 @@ class grund_theme ...@@ -142,6 +154,8 @@ class grund_theme
if ( ! $detail ) if ( ! $detail )
$detail = $this->the_query->get( 'detail', $post->post_type ); $detail = $this->the_query->get( 'detail', $post->post_type );
else
$this->the_query->set( 'detail', $detail );
if ( $this->the_query->have_posts() ) if ( $this->the_query->have_posts() )
{ {
......
<? <?php
global $grund_theme; global $grund_theme;
?> ?>
<article <?=$grund_theme->detail_class()?>> <article <?=$grund_theme->detail_class()?>>
......
...@@ -20,7 +20,7 @@ if ( is_active_sidebar( $sidebar ) ) ...@@ -20,7 +20,7 @@ if ( is_active_sidebar( $sidebar ) )
<div> <div>
<?php get_sidebar( $sidebar ) ?> <?php get_sidebar( $sidebar ) ?>
</div> </div>
<? <?php
get_footer(); get_footer();
} }
else else
......
<? <?php
global $grund_theme; global $grund_theme;
?> ?>
<article <?=$grund_theme->listed_class()?>> <article <?=$grund_theme->listed_class()?>>
......