diff --git a/ai1ec_box.php b/ai1ec_box.php index 6018f0c..9332369 100644 --- a/ai1ec_box.php +++ b/ai1ec_box.php @@ -28,7 +28,10 @@ function set_ai1ec_limits( $limit, $query ) { add_filter('posts_orderby', 'set_ai1ec_orderby'); function set_ai1ec_orderby($orderby) { - $orderby = $wpdb->ai1ec_events.start." ASC"; + global $wpdb; + + $db_prefix=$wpdb->prefix; + $orderby = $db_prefix."ai1ec_events.start ASC"; return $orderby; } diff --git a/css/sbea.css b/css/sbea.css new file mode 100644 index 0000000..233a3b0 --- /dev/null +++ b/css/sbea.css @@ -0,0 +1,48 @@ +/* Where e when nel box eventi*/ +div.cat-box-content li div.ai1ec-excerpt div.ai1ec-time strong, +div.cat-box-content li div.ai1ec-excerpt div.ai1ec-location strong{ + display:none; +} + +/* Font della data e del luogo dell'evento*/ +div.cat-box-content li div.ai1ec-excerpt div.ai1ec-time, +div.cat-box-content li div.ai1ec-excerpt div.ai1ec-location { + font-size:10px; +} + +/* Titoli del primo box*/ +div.cat-box-content li h2.post-box-title { + font-size:16px; + font-weight: bold; +} + +/* Titoli degli altri box*/ +div.cat-box-content li h3.post-box-title { + font-size:13px; + font-weight: bold; +} + +/** I RIASSUNTI ***/ +/* Nascondo il riassuntono a tutti i box ... */ +div.cat-box-content li div.entry p { + display:none; +} +/*.. ma non al primo*/ +div.cat-box-content li.first-news div.entry p { + display:inline; +} + +/* Grandezza del riassunto per le pagine */ +div.cat-box-content li div.entry { + font-size:10px; + margin-top:1px; +} +/*.. ma non per il primo*/ +div.cat-box-content li.first-news div.entry { + font-size:12px; +} + +/* mando a capo il continua a leggere*/ +div.cat-box-content li.first-news div.entry a.more-link { + display: block; +} \ No newline at end of file diff --git a/index.php b/index.php index db77281..15d71af 100644 --- a/index.php +++ b/index.php @@ -9,6 +9,7 @@ Author URI: http://ginex.indivia.net License: BSD(3-clause) Licence */ +/*Intercetto lo shortcode*/ add_shortcode('sbea', 'sbea_inject_box'); function sbea_inject_box($attrs){ if( is_home() && @@ -21,4 +22,13 @@ function sbea_inject_box($attrs){ get_ai1ec_box($attrs); } } +} + +/*Carico il css personalizzato*/ +add_action( 'wp_enqueue_scripts', 'sbea_load_scripts' ); +function sbea_load_scripts($attrs){ + if( is_home()) { + wp_register_style( 'sbea_css', plugins_url( 'css/sbea.css', __FILE__),false,true ); + wp_enqueue_style( 'sbea_css' ); + } } \ No newline at end of file diff --git a/page_box.php b/page_box.php index 42045ac..1582bf7 100644 --- a/page_box.php +++ b/page_box.php @@ -74,6 +74,9 @@ function get_page_box($attrs){ ?>