From d69421b4053ba500bf6bdb578c2e4c7381a638f4 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 12:59:50 +0300 Subject: [PATCH 01/11] Add styles for the main nav's dropdown menu --- css/styles.css | 52 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/css/styles.css b/css/styles.css index e15bb73..e0375c2 100644 --- a/css/styles.css +++ b/css/styles.css @@ -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,10 @@ footer { background: #ddd; } +#copyright { + text-align: center; +} + /* Sub navigation */ .subnav { margin-top: 1.6em; @@ -491,4 +527,4 @@ footer { .sponsors-item .col2 > img { display: inline-block; margin: 0 0 2em 0; -} \ No newline at end of file +} From c282a577007d9e585f855ab979f6d97f8a3a8219 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 13:50:02 +0300 Subject: [PATCH 02/11] Fix minor style difference from template in footer --- css/styles.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/css/styles.css b/css/styles.css index e0375c2..0151429 100644 --- a/css/styles.css +++ b/css/styles.css @@ -456,6 +456,8 @@ footer { background: #ddd; } +footer .content li { list-style: none; } + #copyright { text-align: center; } From 1612f614b7079484a4a6e49a04c8913d316427ac Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 15:33:29 +0300 Subject: [PATCH 03/11] Add ``content'' class to the content --- front-page.php | 2 +- index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/front-page.php b/front-page.php index 583b26a..430c58f 100644 --- a/front-page.php +++ b/front-page.php @@ -1,5 +1,5 @@ -
+
diff --git a/index.php b/index.php index 583b26a..430c58f 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ -
+
From 88acb5fe767e8d93d8d449dc4f06ededf4ad8fb1 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 16:38:17 +0300 Subject: [PATCH 04/11] Create custom post type for Sponsors --- functions.php | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index ad377a9..42b65b1 100644 --- a/functions.php +++ b/functions.php @@ -70,4 +70,52 @@ function sh_latest_posts($atts){ return $result; -} \ No newline at end of file +} + +# 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_nam' => __( '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 ); + +?> From 89316bcfbacd03e440b99947c3ed0beadb9e3c85 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 17:26:37 +0300 Subject: [PATCH 05/11] Add sponsors on front page --- front-page.php | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/front-page.php b/front-page.php index 430c58f..5483a3b 100644 --- a/front-page.php +++ b/front-page.php @@ -1,10 +1,40 @@ -
- - - - - +
+ +
+

+

+
+
+

+ 'sponsors', 'orderby' => 'rand' ); + $the_query = new WP_Query( $args ); + + if ( $the_query->have_posts() ) : + while ( $the_query->have_posts() ) : $the_query->the_post(); + if ( has_post_thumbnail() ) { + ?> + + + + +
From 78c78cfc3e30acafda06bc2971b21f7d0296faea Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 17:31:15 +0300 Subject: [PATCH 06/11] Convert all space tabs into real tabs. Due to WP convention. --- css/styles.css | 27 ++++---- entry-content.php | 16 ++--- entry-footer.php | 16 ++--- entry-meta.php | 8 +-- entry-summary.php | 10 +-- entry.php | 30 ++++----- footer.php | 68 +++++++++---------- front-page.php | 68 +++++++++---------- functions.php | 162 +++++++++++++++++++++++----------------------- header.php | 38 +++++------ index.php | 10 +-- page.php | 12 ++-- 12 files changed, 233 insertions(+), 232 deletions(-) diff --git a/css/styles.css b/css/styles.css index 0151429..ad95996 100644 --- a/css/styles.css +++ b/css/styles.css @@ -236,7 +236,7 @@ nav ul { padding: 0; } nav ul li { - position: relative; + position: relative; } nav .menu > li { @@ -266,18 +266,18 @@ nav ul a { } nav ul .sub-menu { - display: none; - position: absolute; - background: #fff; - width: 200px; - left: 50%; - margin-left: -100px; - box-shadow: 0 3px 5px -3px #000 + 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; + display: block; + position: absolute; } nav ul .sub-menu li, @@ -459,7 +459,7 @@ footer { footer .content li { list-style: none; } #copyright { - text-align: center; + text-align: center; } /* Sub navigation */ @@ -500,9 +500,9 @@ footer .content li { list-style: none; } 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 { @@ -530,3 +530,4 @@ footer .content li { list-style: none; } display: inline-block; margin: 0 0 2em 0; } + diff --git a/entry-content.php b/entry-content.php index 472bdeb..f990ab8 100644 --- a/entry-content.php +++ b/entry-content.php @@ -1,9 +1,9 @@
- - -
-
\ No newline at end of file + + +
+
diff --git a/entry-footer.php b/entry-footer.php index dd9eaa0..15af384 100644 --- a/entry-footer.php +++ b/entry-footer.php @@ -1,9 +1,9 @@ \ No newline at end of file + + + | ' . sprintf( __( 'Comments', 'initfest' ) ) . ''; + } + ?> + diff --git a/entry-meta.php b/entry-meta.php index 2ae8fa7..10e9b05 100644 --- a/entry-meta.php +++ b/entry-meta.php @@ -1,5 +1,5 @@ \ No newline at end of file + + | + +
diff --git a/entry-summary.php b/entry-summary.php index 3ba0aed..038945a 100644 --- a/entry-summary.php +++ b/entry-summary.php @@ -1,6 +1,6 @@
- - -
-
\ No newline at end of file + + +
+
diff --git a/entry.php b/entry.php index f2b8703..f056ecb 100644 --- a/entry.php +++ b/entry.php @@ -1,16 +1,16 @@
> -
- '; - } else { - echo '

'; - } ?> - - '; } else { echo '

'; } ?> - - -
- - -
\ No newline at end of file +
+ '; + } else { + echo '

'; + } ?> + + '; } else { echo '

'; } ?> + + +
+ + + diff --git a/footer.php b/footer.php index d38a952..cfc465b 100644 --- a/footer.php +++ b/footer.php @@ -1,36 +1,36 @@ -
+
-
-
-
-

OpenFest

-

- 'footer-openfest', 'items_wrap' => '%3$s
' )); ?> -

-
-
-

Програма

-

- 'footer-schedule', 'items_wrap' => '%3$s
' )); ?> -

-
-
-

Други

-

- 'footer-others', 'items_wrap' => '%3$s
' )); ?> -

-
-
-

Последвайте ни в:

-

- 'footer-followus', 'items_wrap' => '%3$s
' )); ?> -

-
-
- -
- - +
+
+
+

OpenFest

+

+ 'footer-openfest', 'items_wrap' => '%3$s
' )); ?> +

+
+
+

Програма

+

+ 'footer-schedule', 'items_wrap' => '%3$s
' )); ?> +

+
+
+

Други

+

+ 'footer-others', 'items_wrap' => '%3$s
' )); ?> +

+
+
+

Последвайте ни в:

+

+ 'footer-followus', 'items_wrap' => '%3$s
' )); ?> +

+
+
+ +
+ + diff --git a/front-page.php b/front-page.php index 5483a3b..9ca1c26 100644 --- a/front-page.php +++ b/front-page.php @@ -1,40 +1,40 @@
- -
-

-

-
-
-

- 'sponsors', 'orderby' => 'rand' ); - $the_query = new WP_Query( $args ); + +
+

+

+
+
+

+ 'sponsors', 'orderby' => 'rand' ); + $the_query = new WP_Query( $args ); - if ( $the_query->have_posts() ) : - while ( $the_query->have_posts() ) : $the_query->the_post(); - if ( has_post_thumbnail() ) { - ?> - - - - -
+ if ( $the_query->have_posts() ) : + while ( $the_query->have_posts() ) : $the_query->the_post(); + if ( has_post_thumbnail() ) { + ?> + + + + +
diff --git a/functions.php b/functions.php index 42b65b1..5806db0 100644 --- a/functions.php +++ b/functions.php @@ -1,53 +1,53 @@ __( '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 ); - - $result = '

'.$atts['label'].' | '.__('see all', 'initfest').'

'; - - ob_start(); - - ?> - -
-
-

Разходи за OpenFest 2013

-

От HACKMAN | Публикувано на: 13.11.2013

-

4913.05 – Зали, озвучаване и техника за презентиране
- 2265.07 – Тениски за посетители, екип и доброволци
- 673.18 – Разходи за вода, чай, кафе, вафли, разколнители, канцеларски материали
- 2442.00 – Транспорт, хотел и вечеря за лекторите
- 397.00 – Закуска и обяд за екипа в двата дни ...

- виж цялата новина -
-
-

2013 Network Stats

-

От HACKMAN | Публикувано на: 13.11.2013

-

Удостоверили и сме им раздали 1841 уникални потребителски IP версия 4 + $atts = shortcode_atts( array( + 'cat' => 'news', + 'label' => __('News', 'initfest') + ), $atts ); + + $result = '

'.$atts['label'].' | '.__('see all', 'initfest').'

'; + + ob_start(); + + ?> + +
+
+

Разходи за OpenFest 2013

+

От HACKMAN | Публикувано на: 13.11.2013

+

4913.05 – Зали, озвучаване и техника за презентиране
+ 2265.07 – Тениски за посетители, екип и доброволци
+ 673.18 – Разходи за вода, чай, кафе, вафли, разколнители, канцеларски материали
+ 2442.00 – Транспорт, хотел и вечеря за лекторите
+ 397.00 – Закуска и обяд за екипа в двата дни ...

+ виж цялата новина +
+
+

2013 Network Stats

+

От HACKMAN | Публикувано на: 13.11.2013

+

Удостоверили и сме им раздали 1841 уникални потребителски IP версия 4 адреси и 1356 IPv6 адреси!
Максимума едновременно работещи потребители върху всичките 4 AP-та е 326 устройства и е направен на 2.11.2013 в 15:33 – Зала Варна 2.4GHz 11ng = 44 – Лоби 2.4GHz 11ng = 85 ...

- виж цялата новина -
-
-

Статистика за Бирата

-

От HACKMAN | Публикувано на: 13.11.2013

-

418х Старопрамен наливно 0.500мл
+ виж цялата новина +

+
+

Статистика за Бирата

+

От HACKMAN | Публикувано на: 13.11.2013

+

418х Старопрамен наливно 0.500мл
97х Каменица 0.500мл
62х Бекс
48х Старопрамен бутилка 0.500мл
@@ -58,18 +58,18 @@ function sh_latest_posts($atts){ 23х Гинес
23х ХопГоблин
13х Трупър ...

- виж цялата новина -
-
-
+ виж цялата новина +
+
+
-
+
__( 'Sponsors' ), - 'singular_name' => __( 'Sponsor' ), - 'menu_nam' => __( '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' ), - ); + $labels = array( + 'name' => __( 'Sponsors' ), + 'singular_name' => __( 'Sponsor' ), + 'menu_nam' => __( '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', - ); + $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 ); + register_post_type( 'sponsors', $args ); } add_action( 'init', create_sponsors_posttype ); diff --git a/header.php b/header.php index c8e2dc5..79a6df2 100644 --- a/header.php +++ b/header.php @@ -9,29 +9,29 @@ - + - - - + + + <?php wp_title( ' | ', true, 'right' ); ?> - - - + + + - -
'; - } - ?> \ No newline at end of file + +
'; + } + ?> diff --git a/index.php b/index.php index 430c58f..269983f 100644 --- a/index.php +++ b/index.php @@ -1,10 +1,10 @@
- - - - - + + + + +
diff --git a/page.php b/page.php index fe2eab6..9341b1e 100644 --- a/page.php +++ b/page.php @@ -1,10 +1,10 @@
- - - - - + + + + +
- \ No newline at end of file + From 11da238feffdfa9b49383a40a7a3dca3c0483d08 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sat, 4 Oct 2014 23:54:46 +0300 Subject: [PATCH 07/11] Finish front page --- front-page.php | 95 ++++++++++++++++++++++++++++++++++++-------------- functions.php | 19 +++++++++- 2 files changed, 87 insertions(+), 27 deletions(-) diff --git a/front-page.php b/front-page.php index 9ca1c26..82c8eed 100644 --- a/front-page.php +++ b/front-page.php @@ -1,5 +1,5 @@ -
+
-
-

-

-
-
-

- 'sponsors', 'orderby' => 'rand' ); - $the_query = new WP_Query( $args ); +
+

+

+
+
+

Спонсори

+ 'sponsors', 'orderby' => 'rand' ); + $sponsors = new WP_Query( $sponsors_args ); - if ( $the_query->have_posts() ) : - while ( $the_query->have_posts() ) : $the_query->the_post(); - if ( has_post_thumbnail() ) { - ?> - - - - -
+ if ( $sponsors->have_posts() ) : + while ( $sponsors->have_posts() ) : $sponsors->the_post(); + if ( has_post_thumbnail() ) { + ?> + + + + +
+ +
+ +
+

Новини | виж всички новини

+
+ 5, posts_per_page => 3 ); + $news = new WP_Query( $news_args ); + + if ( $news->have_posts() ) : + while ( $news->have_posts() ) : $news->the_post(); + ?> +
+

+

От | Публикувано на

+ + виж цялата новина +
+ +
+
+ +
+ +
+

Място: Интерпред, София, България

+ 'transportation' ); + $transport = new WP_Query( $transport_args ); + + if ( $transport->have_posts() ) : + while ( $transport->have_posts() ) : $transport->the_post(); + ?> +


+ +
+ diff --git a/functions.php b/functions.php index 5806db0..67a35b5 100644 --- a/functions.php +++ b/functions.php @@ -1,5 +1,4 @@ __( 'Main Menu', 'initfest' ), 'footer-openfest' => __('OpenFest', 'initfest'), @@ -118,4 +117,22 @@ function 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' ); + ?> From b437acaaa723300e06525abf58ed0f067877eb50 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sun, 5 Oct 2014 03:23:42 +0300 Subject: [PATCH 08/11] Add page template for sponsors --- page-sponsors.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/page-sponsors.php b/page-sponsors.php index e69de29..db73537 100644 --- a/page-sponsors.php +++ b/page-sponsors.php @@ -0,0 +1,51 @@ + +
+ +
+
+
+ 'sponsors', 'orderby' => 'rand' ); + $sponsors = new WP_Query( $sponsors_args ); + $sponsor_count = 0; + + if ( $sponsors->have_posts() ) : + while ( $sponsors->have_posts() ) : $sponsors->the_post(); +?> +
+ +
+ +
+
+ + +
+ + From 08f31b268d9776260fdf51b0f2d70eaa50cc4cf3 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sun, 5 Oct 2014 03:32:43 +0300 Subject: [PATCH 09/11] Add custom post type for speakers --- functions.php | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 67a35b5..93c0790 100644 --- a/functions.php +++ b/functions.php @@ -81,7 +81,7 @@ function create_sponsors_posttype() { $labels = array( 'name' => __( 'Sponsors' ), 'singular_name' => __( 'Sponsor' ), - 'menu_nam' => __( 'Sponsors'), + 'menu_name' => __( 'Sponsors'), 'all_items' => __( 'All Sponsors' ), 'view_item' => __( 'View Sponsor' ), 'add_new_item' => __( 'Add New Sponsor' ), @@ -118,6 +118,50 @@ function create_sponsors_posttype() { 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() { From 872dccd39e73e15ca38413d432ea23ba3ce7e1f6 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sun, 5 Oct 2014 03:48:16 +0300 Subject: [PATCH 10/11] Add page template for speakers --- page-speakers.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/page-speakers.php b/page-speakers.php index e69de29..e01be94 100644 --- a/page-speakers.php +++ b/page-speakers.php @@ -0,0 +1,42 @@ + +
+
+
+

Лектори

+ 'speakers' ); + $speakers = new WP_Query( $speakers_args ); + + if ( $speakers->have_posts() ) : + while ( $speakers->have_posts() ) : $speakers->the_post(); + ?> +
+ + + +

+ +
+ +
+
+
+ + From cb6ac254b68bca6344845f720e3c6230df6bbaff Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sun, 5 Oct 2014 08:42:32 +0300 Subject: [PATCH 11/11] Create sponsors shortcode --- front-page.php | 21 ++------------------- functions.php | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/front-page.php b/front-page.php index 82c8eed..08e9e80 100644 --- a/front-page.php +++ b/front-page.php @@ -15,24 +15,7 @@

Спонсори

- 'sponsors', 'orderby' => 'rand' ); - $sponsors = new WP_Query( $sponsors_args ); - - if ( $sponsors->have_posts() ) : - while ( $sponsors->have_posts() ) : $sponsors->the_post(); - if ( has_post_thumbnail() ) { - ?> - - - - +
@@ -52,7 +35,7 @@

От | Публикувано на

- виж цялата новина + виж цялата новина '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'); + + ?>