hacks to show stuff properly

This commit is contained in:
Vasil Kolev 2014-10-07 17:02:23 +03:00 committed by Openfest
parent bfb78b3d89
commit 933aa53330
4 changed files with 17 additions and 10 deletions

View File

@ -218,6 +218,10 @@ function transportation_posttype() {
);
}
function openfest_home_page() {
return !($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2');
}
add_action( 'init', 'transportation_posttype' );
pll_register_string('Schedule','Програма');
pll_register_string('Others','Други');

View File

@ -31,7 +31,7 @@
</div>
</nav>
<?php
if($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2'){
if(openfest_home_page()){
echo '<section class="banner cf"><img src="'.get_template_directory_uri().'/img/banner.png" alt="" /></section>';
}
?>

View File

@ -8,9 +8,18 @@ if ( $pagename == 'about' ||
wp_nav_menu( array( 'theme_location' => 'subnav-menu', 'container_class' => 'content subnav cf' ) );
echo '<div class="separator"></div>';
}
if (openfest_home_page()) {
$coldiv1='';
$coldiv2='';
} else {
$coldiv1='<div class="col-left">';
$coldiv2='</div>';
}
?>
<section class="content grid">
<div class="col-left">
<?php echo $coldiv1; ?>
<h1><?php the_title(); ?></h1>
<?php
if ( have_posts() ) :
@ -19,8 +28,8 @@ if ( $pagename == 'about' ||
endwhile;
endif;
?>
</div>
<?php get_sidebar(); ?>
<?php echo $coldiv1; ?>
<?php if (!openfest_home_page()) get_sidebar(); ?>
</section>
<?php get_footer(); ?>

View File

@ -1,6 +1,3 @@
<?php
if ($wp->query_vars['pagename']!='home' && $wp->query_vars['pagename']!='home-2') {
?>
<div class="col-right">
<h3><?php pll_e('1-ви и 2-ри ноември 2014 г.');?> <br /> <?php pll_e('Интерпред, София, България');?></h3>
@ -9,6 +6,3 @@ if ($wp->query_vars['pagename']!='home' && $wp->query_vars['pagename']!='home-2'
<div class="separator"></div>
<?php echo do_shortcode( '[transport]' ); ?>
</div>
<?php
}
?>