Merge pull request #1 from plazmonii/structure-fixes-and-additions
Structure fixes and additions
This commit is contained in:
commit
dcf4094546
|
@ -235,16 +235,17 @@ nav ul {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
nav ul > li {
|
||||
nav ul li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
nav .menu > li {
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
nav ul a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 1.5em 0.4em;
|
||||
|
||||
nav .menu > li {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
@ -252,9 +253,40 @@ nav ul a {
|
|||
-webkit-transition: border-top 200ms;
|
||||
border-top: 0 solid #FFF;
|
||||
}
|
||||
nav ul a:hover {
|
||||
|
||||
nav .menu > li:hover {
|
||||
border-top: 0.4em solid #A8D6FF;
|
||||
}
|
||||
|
||||
nav ul a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 1.5em 0.4em;
|
||||
}
|
||||
|
||||
nav ul .sub-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
width: 200px;
|
||||
left: 50%;
|
||||
margin-left: -100px;
|
||||
box-shadow: 0 3px 5px -3px #000
|
||||
}
|
||||
|
||||
nav ul li:hover .sub-menu {
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
nav ul .sub-menu li,
|
||||
nav ul .sub-menu li a { display: block; width: 100%; }
|
||||
|
||||
nav ul .sub-menu li a { padding: 1em 0; text-align: center; }
|
||||
|
||||
nav ul .sub-menu li { border-bottom: 1px solid #ccc; }
|
||||
|
||||
nav ul .separator {
|
||||
display: block;
|
||||
width: 0.05em;
|
||||
|
@ -424,6 +456,12 @@ footer {
|
|||
background: #ddd;
|
||||
}
|
||||
|
||||
footer .content li { list-style: none; }
|
||||
|
||||
#copyright {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Sub navigation */
|
||||
.subnav {
|
||||
margin-top: 1.6em;
|
||||
|
@ -462,9 +500,9 @@ footer {
|
|||
float: left;
|
||||
padding: 0.3em;
|
||||
background: #FFF;
|
||||
-moz-box-shadow: 0px 0px 1px 1px #999;
|
||||
-moz-box-shadow: 0px 0px 1px 1px #999;
|
||||
-webkit-box-shadow: 0px 0px 1px 1px #999;
|
||||
box-shadow: 0px 0px 1px 1px #999;
|
||||
box-shadow: 0px 0px 1px 1px #999;
|
||||
margin: 0 1em 2em 0;
|
||||
}
|
||||
.speaker .icons {
|
||||
|
@ -492,3 +530,4 @@ footer {
|
|||
display: inline-block;
|
||||
margin: 0 0 2em 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<section class="entry-content">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail();
|
||||
}
|
||||
?>
|
||||
<?php the_content(); ?>
|
||||
<div class="entry-links"><?php wp_link_pages(); ?></div>
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail();
|
||||
}
|
||||
?>
|
||||
<?php the_content(); ?>
|
||||
<div class="entry-links"><?php wp_link_pages(); ?></div>
|
||||
</section>
|
|
@ -1,9 +1,9 @@
|
|||
<footer class="entry-footer">
|
||||
<span class="cat-links"><?php _e( 'Categories: ', 'blankslate' ); ?><?php the_category( ', ' ); ?></span>
|
||||
<span class="tag-links"><?php the_tags(); ?></span>
|
||||
<?php
|
||||
if ( comments_open() ) {
|
||||
echo '<span class="meta-sep">|</span> <span class="comments-link"><a href="' . get_comments_link() . '">' . sprintf( __( 'Comments', 'initfest' ) ) . '</a></span>';
|
||||
}
|
||||
?>
|
||||
<span class="cat-links"><?php _e( 'Categories: ', 'blankslate' ); ?><?php the_category( ', ' ); ?></span>
|
||||
<span class="tag-links"><?php the_tags(); ?></span>
|
||||
<?php
|
||||
if ( comments_open() ) {
|
||||
echo '<span class="meta-sep">|</span> <span class="comments-link"><a href="' . get_comments_link() . '">' . sprintf( __( 'Comments', 'initfest' ) ) . '</a></span>';
|
||||
}
|
||||
?>
|
||||
</footer>
|
|
@ -1,5 +1,5 @@
|
|||
<section class="entry-meta">
|
||||
<span class="author vcard"><?php the_author_posts_link(); ?></span>
|
||||
<span class="meta-sep"> | </span>
|
||||
<span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span>
|
||||
<span class="author vcard"><?php the_author_posts_link(); ?></span>
|
||||
<span class="meta-sep"> | </span>
|
||||
<span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span>
|
||||
</section>
|
|
@ -1,6 +1,6 @@
|
|||
<section class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
<?php if( is_search() ) { ?>
|
||||
<div class="entry-links"><?php wp_link_pages(); ?></div
|
||||
><?php } ?>
|
||||
<?php the_excerpt(); ?>
|
||||
<?php if( is_search() ) { ?>
|
||||
<div class="entry-links"><?php wp_link_pages(); ?></div
|
||||
><?php } ?>
|
||||
</section>
|
28
entry.php
28
entry.php
|
@ -1,16 +1,16 @@
|
|||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header>
|
||||
<?php
|
||||
if ( is_singular() ) {
|
||||
echo '<h1 class="entry-title">';
|
||||
} else {
|
||||
echo '<h2 class="entry-title">';
|
||||
} ?>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
|
||||
<?php if ( is_singular() ) { echo '</h1>'; } else { echo '</h2>'; } ?>
|
||||
<?php edit_post_link(); ?>
|
||||
<?php if ( !is_search() && !is_page() && !is_front_page()) get_template_part( 'entry', 'meta' ); ?>
|
||||
</header>
|
||||
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
|
||||
<?php if ( !is_search() && !is_page() && !is_front_page()) get_template_part( 'entry-footer' ); ?>
|
||||
<header>
|
||||
<?php
|
||||
if ( is_singular() ) {
|
||||
echo '<h1 class="entry-title">';
|
||||
} else {
|
||||
echo '<h2 class="entry-title">';
|
||||
} ?>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
|
||||
<?php if ( is_singular() ) { echo '</h1>'; } else { echo '</h2>'; } ?>
|
||||
<?php edit_post_link(); ?>
|
||||
<?php if ( !is_search() && !is_page() && !is_front_page()) get_template_part( 'entry', 'meta' ); ?>
|
||||
</header>
|
||||
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
|
||||
<?php if ( !is_search() && !is_page() && !is_front_page()) get_template_part( 'entry-footer' ); ?>
|
||||
</article>
|
68
footer.php
68
footer.php
|
@ -1,36 +1,36 @@
|
|||
<div class="clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<footer>
|
||||
<div class="content grid">
|
||||
<div class="col4">
|
||||
<h3>OpenFest</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-openfest', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<h3>Програма</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-schedule', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<h3>Други</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-others', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<h3>Последвайте ни в:</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-followus', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="copyright">
|
||||
<?php echo sprintf( __( '%1$s %2$s %3$s. Some Rights Reserved.', 'initfest' ), '©', date( 'Y' ), esc_html( get_bloginfo( 'name' ) ) ); ?>
|
||||
</div>
|
||||
</footer>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
<footer>
|
||||
<div class="content grid">
|
||||
<div class="col4">
|
||||
<h3>OpenFest</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-openfest', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<h3>Програма</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-schedule', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<h3>Други</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-others', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<h3>Последвайте ни в:</h3>
|
||||
<p>
|
||||
<?php wp_nav_menu(array('theme_location' => 'footer-followus', 'items_wrap' => '%3$s<br/>' )); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="copyright">
|
||||
<?php echo sprintf( __( '%1$s %2$s %3$s. Some Rights Reserved.', 'initfest' ), '©', date( 'Y' ), esc_html( get_bloginfo( 'name' ) ) ); ?>
|
||||
</div>
|
||||
</footer>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,10 +1,66 @@
|
|||
<?php get_header(); ?>
|
||||
<section id="content" role="main">
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'entry' ); ?>
|
||||
<?php comments_template(); ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php get_template_part( 'nav', 'below' ); ?>
|
||||
<section class="content grid">
|
||||
<?php
|
||||
/*
|
||||
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
||||
get_template_part( 'entry' );
|
||||
comments_template();
|
||||
endwhile; endif;
|
||||
get_template_part( 'nav', 'below' );
|
||||
*/
|
||||
?>
|
||||
<div class="col2">
|
||||
<h1><?php echo get_bloginfo('name'); ?> </h1>
|
||||
<p><?php echo get_bloginfo('description'); ?></p>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<h3>Спонсори</h3>
|
||||
<?php echo do_shortcode( '[sponsors]' ); ?>
|
||||
</div>
|
||||
</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_footer(); ?>
|
||||
|
|
228
functions.php
228
functions.php
|
@ -1,53 +1,52 @@
|
|||
<?php
|
||||
|
||||
register_nav_menus(
|
||||
array( 'main-menu' => __( 'Main Menu', 'initfest' ),
|
||||
'footer-openfest' => __('OpenFest', 'initfest'),
|
||||
'footer-openfest' => __('OpenFest', 'initfest'),
|
||||
'footer-schedule' => __('Schedule', 'initfest'),
|
||||
'footer-others' => __('Others', 'initfest'),
|
||||
'footer-followus' => __('Follow us in:', 'initfest') )
|
||||
array( 'main-menu' => __( 'Main Menu', 'initfest' ),
|
||||
'footer-openfest' => __('OpenFest', 'initfest'),
|
||||
'footer-openfest' => __('OpenFest', 'initfest'),
|
||||
'footer-schedule' => __('Schedule', 'initfest'),
|
||||
'footer-others' => __('Others', 'initfest'),
|
||||
'footer-followus' => __('Follow us in:', 'initfest') )
|
||||
);
|
||||
|
||||
add_shortcode('sh-latest-posts', 'sh_latest_posts');
|
||||
|
||||
function sh_latest_posts($atts){
|
||||
$atts = shortcode_atts( array(
|
||||
'cat' => 'news',
|
||||
'label' => __('News', 'initfest')
|
||||
), $atts );
|
||||
$atts = shortcode_atts( array(
|
||||
'cat' => 'news',
|
||||
'label' => __('News', 'initfest')
|
||||
), $atts );
|
||||
|
||||
$result = '<div class="separator"></div><section class="content"><h3>'.$atts['label'].' | <small><a href="'.esc_url(get_term_link($atts['cat'], 'category')).'">'.__('see all', 'initfest').'</a></small></h3>';
|
||||
$result = '<div class="separator"></div><section class="content"><h3>'.$atts['label'].' | <small><a href="'.esc_url(get_term_link($atts['cat'], 'category')).'">'.__('see all', 'initfest').'</a></small></h3>';
|
||||
|
||||
ob_start();
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<div class="grid">
|
||||
<div class="col3">
|
||||
<h4>Разходи за OpenFest 2013</h4>
|
||||
<p class="info">От HACKMAN | Публикувано на: 13.11.2013</p>
|
||||
<p>4913.05 – Зали, озвучаване и техника за презентиране<br />
|
||||
2265.07 – Тениски за посетители, екип и доброволци<br />
|
||||
673.18 – Разходи за вода, чай, кафе, вафли, разколнители, канцеларски материали<br />
|
||||
2442.00 – Транспорт, хотел и вечеря за лекторите<br />
|
||||
397.00 – Закуска и обяд за екипа в двата дни ...</p>
|
||||
<a href="#" class="button">виж цялата новина</a>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<h4>2013 Network Stats</h4>
|
||||
<p class="info">От HACKMAN | Публикувано на: 13.11.2013</p>
|
||||
<p>Удостоверили и сме им раздали 1841 уникални потребителски IP версия 4
|
||||
<div class="grid">
|
||||
<div class="col3">
|
||||
<h4>Разходи за OpenFest 2013</h4>
|
||||
<p class="info">От HACKMAN | Публикувано на: 13.11.2013</p>
|
||||
<p>4913.05 – Зали, озвучаване и техника за презентиране<br />
|
||||
2265.07 – Тениски за посетители, екип и доброволци<br />
|
||||
673.18 – Разходи за вода, чай, кафе, вафли, разколнители, канцеларски материали<br />
|
||||
2442.00 – Транспорт, хотел и вечеря за лекторите<br />
|
||||
397.00 – Закуска и обяд за екипа в двата дни ...</p>
|
||||
<a href="#" class="button">виж цялата новина</a>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<h4>2013 Network Stats</h4>
|
||||
<p class="info">От HACKMAN | Публикувано на: 13.11.2013</p>
|
||||
<p>Удостоверили и сме им раздали 1841 уникални потребителски IP версия 4
|
||||
адреси и 1356 IPv6 адреси!<br />Максимума едновременно работещи потребители върху всичките 4 AP-та е 326
|
||||
устройства и е направен на 2.11.2013 в 15:33
|
||||
– Зала Варна 2.4GHz 11ng = 44
|
||||
– Лоби 2.4GHz 11ng = 85 ...</p>
|
||||
<a href="#" class="button">виж цялата новина</a>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<h4>Статистика за Бирата</h4>
|
||||
<p class="info">От HACKMAN | Публикувано на: 13.11.2013</p>
|
||||
<p>418х Старопрамен наливно 0.500мл<br />
|
||||
<a href="#" class="button">виж цялата новина</a>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<h4>Статистика за Бирата</h4>
|
||||
<p class="info">От HACKMAN | Публикувано на: 13.11.2013</p>
|
||||
<p>418х Старопрамен наливно 0.500мл<br />
|
||||
97х Каменица 0.500мл<br />
|
||||
62х Бекс<br />
|
||||
48х Старопрамен бутилка 0.500мл<br />
|
||||
|
@ -58,16 +57,159 @@ function sh_latest_posts($atts){
|
|||
23х Гинес<br />
|
||||
23х ХопГоблин<br />
|
||||
13х Трупър ...</p>
|
||||
<a href="#" class="button">виж цялата новина</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<a href="#" class="button">виж цялата новина</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="separator"></div>
|
||||
<div class="separator"></div>
|
||||
<?php
|
||||
$result .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
$result .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
return $result;
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
# Add support for thumbnais
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
|
||||
|
||||
# Create a custom post type for Sponsors
|
||||
function create_sponsors_posttype() {
|
||||
|
||||
$labels = array(
|
||||
'name' => __( 'Sponsors' ),
|
||||
'singular_name' => __( 'Sponsor' ),
|
||||
'menu_name' => __( 'Sponsors'),
|
||||
'all_items' => __( 'All Sponsors' ),
|
||||
'view_item' => __( 'View Sponsor' ),
|
||||
'add_new_item' => __( 'Add New Sponsor' ),
|
||||
'add_new' => __( 'Add New' ),
|
||||
'edit_item' => __( 'Edit Sponsor' ),
|
||||
'update_item' => __( 'Update Sponsor' ),
|
||||
'search_item' => __( 'Search Sponsor' ),
|
||||
'not_found' => __( 'Not Found' ),
|
||||
'not_found_in_trash' => __( 'Not Found In Trash' ),
|
||||
);
|
||||
|
||||
$args = array(
|
||||
'label' => __( 'sponsors' ),
|
||||
'description' => __( 'Sponsors of OpenFest' ),
|
||||
'labels' => $labels,
|
||||
'supports' => array( 'title', 'excerpt', 'thumbnail', 'custom-fields', ),
|
||||
'hierarchical' => false,
|
||||
'public' => true,
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => true,
|
||||
'show_in_nav_menus' => true,
|
||||
'show_in_admin_bar' => true,
|
||||
'menu_position' => 5,
|
||||
'can_export' => true,
|
||||
'has_archive' => true,
|
||||
'exclude_from_search' => false,
|
||||
'publicly_queryable' => true,
|
||||
'capability_type' => 'post',
|
||||
);
|
||||
|
||||
register_post_type( 'sponsors', $args );
|
||||
}
|
||||
|
||||
add_action( 'init', create_sponsors_posttype );
|
||||
|
||||
|
||||
# Create a custom post type for Speakers
|
||||
function create_speakers_posttype() {
|
||||
|
||||
$labels = array(
|
||||
'name' => __( 'Speakers' ),
|
||||
'singular_name' => __( 'Speaker' ),
|
||||
'menu_name' => __( 'Speakers'),
|
||||
'all_items' => __( 'All Speakers' ),
|
||||
'view_item' => __( 'View Speaker' ),
|
||||
'add_new_item' => __( 'Add New Speaker' ),
|
||||
'add_new' => __( 'Add New' ),
|
||||
'edit_item' => __( 'Edit Speaker' ),
|
||||
'update_item' => __( 'Update Speaker' ),
|
||||
'search_item' => __( 'Search Speaker' ),
|
||||
'not_found' => __( 'Not Found' ),
|
||||
'not_found_in_trash' => __( 'Not Found In Trash' ),
|
||||
);
|
||||
|
||||
$args = array(
|
||||
'label' => __( 'speakers' ),
|
||||
'description' => __( 'Speakers on OpenFest' ),
|
||||
'labels' => $labels,
|
||||
'supports' => array( 'title', 'excerpt', 'thumbnail', 'custom-fields', ),
|
||||
'hierarchical' => false,
|
||||
'public' => true,
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => true,
|
||||
'show_in_nav_menus' => true,
|
||||
'show_in_admin_bar' => true,
|
||||
'menu_position' => 6,
|
||||
'can_export' => true,
|
||||
'has_archive' => true,
|
||||
'exclude_from_search' => false,
|
||||
'publicly_queryable' => true,
|
||||
'capability_type' => 'post',
|
||||
);
|
||||
|
||||
register_post_type( 'speakers', $args );
|
||||
}
|
||||
|
||||
add_action( 'init', create_speakers_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' );
|
||||
|
||||
|
||||
# Create shortcode for sponsors
|
||||
function sponsors_shortcode() {
|
||||
global $post;
|
||||
|
||||
$output = '';
|
||||
|
||||
$sponsors_args = array( 'post_type' => 'sponsors', 'orderby' => 'rand' );
|
||||
$sponsors = new WP_Query( $sponsors_args );
|
||||
|
||||
if ( $sponsors->have_posts() ) :
|
||||
while ( $sponsors->have_posts() ) : $sponsors->the_post();
|
||||
if ( has_post_thumbnail() ) {
|
||||
$output .= the_post_thumbnail();
|
||||
} else {
|
||||
$output .= get_the_title();
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Register all shortcodes
|
||||
function register_shortcodes(){
|
||||
add_shortcode('sponsors', 'sponsors_shortcode');
|
||||
}
|
||||
|
||||
add_action( 'init', 'register_shortcodes');
|
||||
|
||||
|
||||
?>
|
||||
|
|
34
header.php
34
header.php
|
@ -9,29 +9,29 @@
|
|||
<meta name="robots" content="follow,index" />
|
||||
<meta name="title" content="" />
|
||||
<meta name="keywords" content="" lang="en-us" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="description" content="" />
|
||||
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||
<link rel="icon" type="image/png" href="">
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||
<link rel="icon" type="image/png" href="">
|
||||
|
||||
<title><?php wp_title( ' | ', true, 'right' ); ?></title>
|
||||
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" />
|
||||
<?php wp_head(); ?>
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" />
|
||||
<?php wp_head(); ?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav>
|
||||
<div class="content cf">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="logo"><img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="OpenFest" /></a>
|
||||
<nav>
|
||||
<div class="content cf">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="logo"><img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="OpenFest" /></a>
|
||||
|
||||
<?php wp_nav_menu( array('theme_location' => 'main-menu') ); ?>
|
||||
</div>
|
||||
</nav>
|
||||
<?php
|
||||
if(is_front_page()){
|
||||
echo '<section class="banner cf"><img src="'.get_template_directory_uri().'/img/banner.png" alt="" /></section>';
|
||||
}
|
||||
?>
|
||||
<?php wp_nav_menu( array('theme_location' => 'main-menu') ); ?>
|
||||
</div>
|
||||
</nav>
|
||||
<?php
|
||||
if(is_front_page()){
|
||||
echo '<section class="banner cf"><img src="'.get_template_directory_uri().'/img/banner.png" alt="" /></section>';
|
||||
}
|
||||
?>
|
||||
|
|
12
index.php
12
index.php
|
@ -1,10 +1,10 @@
|
|||
<?php get_header(); ?>
|
||||
<section id="content" role="main">
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'entry' ); ?>
|
||||
<?php comments_template(); ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php get_template_part( 'nav', 'below' ); ?>
|
||||
<section id="content" role="main" class="content">
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'entry' ); ?>
|
||||
<?php comments_template(); ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php get_template_part( 'nav', 'below' ); ?>
|
||||
</section>
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/*
|
||||
Template Name: Speakers
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
<div class="separator"></div>
|
||||
<section class="content grid">
|
||||
<div class="col-left">
|
||||
<h1 class="big">Лектори</h1>
|
||||
<?php
|
||||
$speakers_args = array( 'post_type' => 'speakers' );
|
||||
$speakers = new WP_Query( $speakers_args );
|
||||
|
||||
if ( $speakers->have_posts() ) :
|
||||
while ( $speakers->have_posts() ) : $speakers->the_post();
|
||||
?>
|
||||
<div class="speaker">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail();
|
||||
} else {
|
||||
?>
|
||||
<img src="img/speakers.jpg">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<h3><?php the_title(); ?></h3>
|
||||
<?php
|
||||
the_content();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-right"><?php get_sidebar(); ?></div>
|
||||
</section>
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
/*
|
||||
Template Name: Sponsors
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
<section class="content">
|
||||
<?php
|
||||
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
||||
the_content();
|
||||
endwhile; endif;
|
||||
?>
|
||||
</section>
|
||||
<div class="separator"></div>
|
||||
<section class="content grid sponsors-item">
|
||||
<?php
|
||||
$sponsors_args = array( 'post_type' => 'sponsors', 'orderby' => 'rand' );
|
||||
$sponsors = new WP_Query( $sponsors_args );
|
||||
$sponsor_count = 0;
|
||||
|
||||
if ( $sponsors->have_posts() ) :
|
||||
while ( $sponsors->have_posts() ) : $sponsors->the_post();
|
||||
?>
|
||||
<div class="col2 tac">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail();
|
||||
} else {
|
||||
the_title();
|
||||
}
|
||||
|
||||
the_content();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$sponsor_count++;
|
||||
if ($sponsor_count % 2 == 0) {
|
||||
?>
|
||||
</section>
|
||||
<section class="content grid sponsors-item">
|
||||
<?php
|
||||
}
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php get_footer(); ?>
|
10
page.php
10
page.php
|
@ -1,10 +1,10 @@
|
|||
<?php get_header(); ?>
|
||||
<section id="content" role="main">
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'entry' ); ?>
|
||||
<?php //comments_template(); NO COMMENTS IN PAGES PLEASE ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php //get_template_part( 'nav', 'below' ); ?>
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'entry' ); ?>
|
||||
<?php //comments_template(); NO COMMENTS IN PAGES PLEASE ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php //get_template_part( 'nav', 'below' ); ?>
|
||||
</section>
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
Loading…
Reference in New Issue