'.$atts['label'].' | '.__('see all', 'initfest').'
';
- $news_args = array( 'category_name' => $cat, 'numberposts' => 3 );
+ $news_args = array( 'category_name' => 'news', 'numberposts' => 3, 'lang' => of_get_lang() );
$news = new WP_Query( $news_args );
ob_start();
@@ -157,7 +157,7 @@ function create_sponsors_posttype() {
register_post_type( 'sponsors', $args );
}
-add_action( 'init', create_sponsors_posttype );
+add_action( 'init', 'create_sponsors_posttype' );
# Create a custom post type for Speakers
@@ -200,7 +200,7 @@ function create_speakers_posttype() {
register_post_type( 'speakers', $args );
}
-add_action( 'init', create_speakers_posttype );
+add_action( 'init', 'create_speakers_posttype' );
# Create a custom post type for Tranportation
@@ -219,6 +219,7 @@ function transportation_posttype() {
}
function openfest_home_page() {
+ if (empty($wp)) {return true;} ;
return !($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2');
}
From c69cca66912458b73996a5b755644d71b7bfad94 Mon Sep 17 00:00:00 2001
From: Vasil Kolev
Date: Fri, 10 Oct 2014 17:26:11 +0300
Subject: [PATCH 3/7] icons for team people, fix from Krasimir
---
css/styles.css | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/css/styles.css b/css/styles.css
index d077c59..ebaa0ed 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -539,12 +539,11 @@ footer .content li { list-style: none; }
margin: 0 1em 2em 0;
}
.speaker .icons {
- position: absolute;
- top: 125px;
- left: 0;
- font-size: 1.2em;
+ font-size: 0.8em;
width: 122px;
text-align: center;
+ display: inline-block;
+ margin: 0 0 0 0.1em;
}
.speaker .icons a {
display: inline-block;
From 3756bffab23a454397dad458566f80ab9344a2e6 Mon Sep 17 00:00:00 2001
From: Vasil Kolev
Date: Sun, 12 Oct 2014 12:59:55 +0300
Subject: [PATCH 4/7] fix for the speakers' icons
---
css/styles.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/css/styles.css b/css/styles.css
index ebaa0ed..ae78d26 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -529,7 +529,7 @@ footer .content li { list-style: none; }
display: block;
}
.speaker > img {
- width: 100px;
+/* width: 100px; */
float: left;
padding: 0.3em;
background: #FFF;
From 521d306513c3a0f06bbd4243f007a09c84012497 Mon Sep 17 00:00:00 2001
From: Vasil Kolev
Date: Sun, 12 Oct 2014 13:00:11 +0300
Subject: [PATCH 5/7] stolen func to get id of attachment
---
functions.php | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/functions.php b/functions.php
index ede45ea..3177bc8 100644
--- a/functions.php
+++ b/functions.php
@@ -237,6 +237,34 @@ function e_($word) {
echo $word;
}
+function pn_get_attachment_id_from_url( $attachment_url = '' ) {
+
+ global $wpdb;
+ $attachment_id = false;
+
+ // If there is no url, return.
+ if ( '' == $attachment_url )
+ return;
+
+ // Get the upload directory paths
+ $upload_dir_paths = wp_upload_dir();
+
+ // Make sure the upload path base directory exists in the attachment URL, to verify that we're working with a media library image
+ if ( false !== strpos( $attachment_url, $upload_dir_paths['baseurl'] ) ) {
+
+ // If this is the URL of an auto-generated thumbnail, get the URL of the original image
+ $attachment_url = preg_replace( '/-\d+x\d+(?=\.(jpg|jpeg|png|gif)$)/i', '', $attachment_url );
+
+ // Remove the upload path base directory from the attachment URL
+ $attachment_url = str_replace( $upload_dir_paths['baseurl'] . '/', '', $attachment_url );
+
+ // Finally, run a custom database query to get the attachment ID from the modified attachment URL
+ $attachment_id = $wpdb->get_var( $wpdb->prepare( "SELECT wposts.ID FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = '_wp_attached_file' AND wpostmeta.meta_value = '%s' AND wposts.post_type = 'attachment'", $attachment_url ) );
+
+ }
+
+ return $attachment_id;
+}
add_action( 'init', 'transportation_posttype' );
if (function_exists("pll_register_string")) {
@@ -255,3 +283,4 @@ if (function_exists("pll_register_string")) {
?>
+
From e3e1bf23ef3754079de7b21038d8615e448ee978 Mon Sep 17 00:00:00 2001
From: Vasil Kolev
Date: Sun, 12 Oct 2014 13:00:46 +0300
Subject: [PATCH 6/7] small fixes
---
page-speakers.php | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/page-speakers.php b/page-speakers.php
index 457b79c..abb3d33 100644
--- a/page-speakers.php
+++ b/page-speakers.php
@@ -1,11 +1,15 @@
Лектори
'speakers' ); + $speakers_args = array( 'post_type' => 'speakers', 'nopaging' => 'true', 'order' => 'ASC' ); $speakers = new WP_Query( $speakers_args ); if ( $speakers->have_posts() ) : @@ -14,10 +18,10 @@ get_header(); ?>
-
+
From 83878ce184b60858f89bba208104257a622a10d2 Mon Sep 17 00:00:00 2001
From: Vasil Kolev
Date: Sun, 12 Oct 2014 13:10:24 +0300
Subject: [PATCH 7/7] make this to have the proper design
---
page-speakers.php | 36 ++++++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/page-speakers.php b/page-speakers.php
index abb3d33..aef4f36 100644
--- a/page-speakers.php
+++ b/page-speakers.php
@@ -8,6 +8,8 @@ get_header(); ?>
Лектори
+ +
'speakers', 'nopaging' => 'true', 'order' => 'ASC' );
$speakers = new WP_Query( $speakers_args );
@@ -15,7 +17,37 @@ get_header(); ?>
if ( $speakers->have_posts() ) :
while ( $speakers->have_posts() ) : $speakers->the_post();
?>
-
+
+ 'speakers', 'nopaging' => 'true', 'order' => 'ASC' );
+ $speakers = new WP_Query( $speakers_args );
+
+ if ( $speakers->have_posts() ) :
+ while ( $speakers->have_posts() ) : $speakers->the_post();
+ ?>
+
+
+
+
+
+
+
+ + +
+
+
++ + +
endif;
?>
-
+