Structure fixes and additions #1
|
@ -1,5 +1,5 @@
|
||||||
<?php get_header(); ?>
|
<?php get_header(); ?>
|
||||||
<section id="content" role="main" class="front-page content grid">
|
<section class="content grid">
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
||||||
|
@ -10,17 +10,17 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<h1></h1>
|
<h1><?php echo get_bloginfo('name'); ?> </h1>
|
||||||
<p></p>
|
<p><?php echo get_bloginfo('description'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<h3><?php echo __( 'Sponsors' ); ?></h3>
|
<h3>Спонсори</h3>
|
||||||
<?php
|
<?php
|
||||||
$args = array( 'post_type' => 'sponsors', 'orderby' => 'rand' );
|
$sponsors_args = array( 'post_type' => 'sponsors', 'orderby' => 'rand' );
|
||||||
$the_query = new WP_Query( $args );
|
$sponsors = new WP_Query( $sponsors_args );
|
||||||
|
|
||||||
if ( $the_query->have_posts() ) :
|
if ( $sponsors->have_posts() ) :
|
||||||
while ( $the_query->have_posts() ) : $the_query->the_post();
|
while ( $sponsors->have_posts() ) : $sponsors->the_post();
|
||||||
if ( has_post_thumbnail() ) {
|
if ( has_post_thumbnail() ) {
|
||||||
?>
|
?>
|
||||||
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
|
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
|
||||||
|
@ -31,10 +31,53 @@
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
endwhile;
|
endwhile;
|
||||||
wp_reset_postdata();
|
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<h3>Новини | <small><a href="">виж всички новини</a></small></h3>
|
||||||
|
<div class="grid">
|
||||||
|
<?php
|
||||||
|
$news_args = array( 'cat' => 5, posts_per_page => 3 );
|
||||||
|
$news = new WP_Query( $news_args );
|
||||||
|
|
||||||
|
if ( $news->have_posts() ) :
|
||||||
|
while ( $news->have_posts() ) : $news->the_post();
|
||||||
|
?>
|
||||||
|
<div class="col3">
|
||||||
|
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
|
||||||
|
<p class="info">От <?php the_author(); ?> | Публикувано на <?php the_date(); ?> </p>
|
||||||
|
<?php the_excerpt(); ?>
|
||||||
|
<a class="button" href="<?php the_permalink(); ?>">виж цялата новина</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endwhile;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
<section class="content grid">
|
||||||
|
<h3>Място: Интерпред, София, България</h3>
|
||||||
|
<?php
|
||||||
|
$transport_args = array( 'post_type' => 'transportation' );
|
||||||
|
$transport = new WP_Query( $transport_args );
|
||||||
|
|
||||||
|
if ( $transport->have_posts() ) :
|
||||||
|
while ( $transport->have_posts() ) : $transport->the_post();
|
||||||
|
?>
|
||||||
|
<p><?php the_title(); ?> <br /> <?php the_content(); ?></p>
|
||||||
|
<?php
|
||||||
|
endwhile;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
register_nav_menus(
|
register_nav_menus(
|
||||||
array( 'main-menu' => __( 'Main Menu', 'initfest' ),
|
array( 'main-menu' => __( 'Main Menu', 'initfest' ),
|
||||||
'footer-openfest' => __('OpenFest', 'initfest'),
|
'footer-openfest' => __('OpenFest', 'initfest'),
|
||||||
|
@ -118,4 +117,22 @@ function create_sponsors_posttype() {
|
||||||
|
|
||||||
add_action( 'init', create_sponsors_posttype );
|
add_action( 'init', create_sponsors_posttype );
|
||||||
|
|
||||||
|
|
||||||
|
# Create a custom post type for Tranportation
|
||||||
|
function transportation_posttype() {
|
||||||
|
|
||||||
|
register_post_type( 'transportation',
|
||||||
|
array(
|
||||||
|
'labels' => array(
|
||||||
|
'name' => __( 'Tranportation' ),
|
||||||
|
),
|
||||||
|
'public' => true,
|
||||||
|
'has_archive' => true,
|
||||||
|
'rewrite' => array('slug' => 'transportation'),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'transportation_posttype' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue