diff --git a/front-page.php b/front-page.php index 20ba6e0..77c8de2 100755 --- a/front-page.php +++ b/front-page.php @@ -10,7 +10,7 @@ $page_sections = [ 'upper' => ['overview', 'preevents'], - 'lower' => ['agenda', 'speakers', 'tickets', 'testimonials', 'sponsors-cta', 'faqs', 'countdown', 'social_feed', 'sponsors', 'common/cta'] + 'lower' => ['agenda', 'speakers', 'tickets', 'testimonials', 'sponsors-cta', 'faqs', 'countdown', 'social_feed', 'common/sponsors', 'common/cta'] ]; ?> diff --git a/functions.php b/functions.php index c790f41..688e81c 100755 --- a/functions.php +++ b/functions.php @@ -176,6 +176,12 @@ function devcon_msummit2024_load_fonts() { } add_action('wp_head', 'devcon_msummit2024_load_fonts', 10); +function devcon_msummit2024_excerpt_length( $length ) { + return 45; +} + +add_filter( 'excerpt_length', 'devcon_msummit2024_excerpt_length', 999 ); + /** * Disable WP admin bar */ diff --git a/home.php b/home.php index 01e1f0c..a2fe0d2 100644 --- a/home.php +++ b/home.php @@ -25,7 +25,10 @@ class="absolute inset-x-0 top-0 w-full bg-no-repeat bg-top bg-contain lg:bg-cove
- $post]); ?> + $post, + 'class' => 'md:h-[30rem]' + ]); ?>
@@ -37,7 +40,7 @@ class="absolute inset-x-0 top-0 w-full bg-no-repeat bg-top bg-contain lg:bg-cove ?>
- $post]); ?> + $post, 'excerpt' => true]); ?>
post_author : get_the_author_meta( 'ID' ) )); $pby_string = $link ? '' . $author_meta . '' : $author_meta; @@ -50,8 +50,13 @@ function devcon_msummit2024_posted_by($class_name = '', bool $link = true, WP_Po ''.$pby_string.'' ); - echo ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + $text = ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + if ($avatar) { + $text = '
' . get_avatar( $post ? $post->post_author : get_the_author_meta( 'ID' ), 32, '', '', [ 'class' => 'rounded-full' ] ) . $text . '
'; + } + + echo $text; } endif; diff --git a/template-parts/blog/article-card-horizontal.php b/template-parts/blog/article-card-horizontal.php index 396184a..b49220e 100644 --- a/template-parts/blog/article-card-horizontal.php +++ b/template-parts/blog/article-card-horizontal.php @@ -2,7 +2,8 @@ /** @var $args array */ $args = wp_parse_args($args, [ - 'post' => $post + 'post' => $post, + 'class' => '' ]); $post = $args['post']; @@ -13,39 +14,24 @@ + class=" flex items-stretch h-full shadow-lg transition-all scale-100 hover:scale-[1.05] border border-white/20 hover:border-[hsl(52deg,100%,50%)] rounded-xl">
-
-
- -
- name ?> -
- - -
- - -
- -

- - -
- +
+ +
+ name ?>
+ -
- Read More - - - -
-
+

+
+ + +
diff --git a/template-parts/blog/article-card.php b/template-parts/blog/article-card.php index 729d27c..a6e6b67 100644 --- a/template-parts/blog/article-card.php +++ b/template-parts/blog/article-card.php @@ -2,48 +2,51 @@ /** @var $args array */ $args = wp_parse_args($args, [ - 'post' => $post + 'post' => $post, + 'excerpt' => false ]); $post = $args['post']; +$category = get_the_category($post->ID); +$thumbnail_url = get_the_post_thumbnail_url() ?: devcon_msummit2024_get_asset_url('blog_placeholder.jpg', return: true); ?> + class="relative flex flex-col h-full shadow-lg transition-transform scale-100 hover:scale-[1.05]"> -
- ID) ?> - - +
+
+
-
+
-
+
name ?> -
+
-
-
-
-
-

- -
- - -
- -
- Read More - - - -
-
+

+
+ + +
+ + +
+ +
+ +
+ +
+ Read More + + + +
diff --git a/template-parts/landing-page/sponsors.php b/template-parts/common/sponsors.php similarity index 100% rename from template-parts/landing-page/sponsors.php rename to template-parts/common/sponsors.php diff --git a/template-sponsors.php b/template-sponsors.php index 867a733..b98f3a9 100644 --- a/template-sponsors.php +++ b/template-sponsors.php @@ -4,7 +4,7 @@ get_header(); $page_sections = [ - 'lower' => ['landing-page/testimonials', 'landing-page/faqs', 'landing-page/countdown', 'landing-page/sponsors', 'landing-page/social_feed'] + 'lower' => ['landing-page/testimonials', 'landing-page/faqs', 'landing-page/countdown', 'common/sponsors', 'landing-page/social_feed'] ]; ?>