From 5136a9afb871b8d00dbade8bb99083379d464ee7 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 16 Apr 2021 18:34:19 -0400 Subject: [PATCH] add profile directory bumper to top callout section --- functions.php | 11 ++++++++++- style.css | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 9a18a27..b5c004f 100755 --- a/functions.php +++ b/functions.php @@ -369,6 +369,7 @@ function wasmo_update_user( $post_id ) { delete_transient( 'directory-public-full--1' ); delete_transient( 'directory-private-widget-9' ); delete_transient( 'directory-public-widget-9' ); + delete_transient( 'directory-public-bumper-4' ); delete_transient( 'directory-private-shortcode-12' ); delete_transient( 'directory-public-shortcode-12' ); delete_transient( 'directory-private-shortcode--1' ); @@ -694,7 +695,15 @@ function wasmo_before_after($content) { // top if ( get_field( 'before_post_callout', 'option' ) ) { - $top_callout = '
' . get_field( 'before_post_callout', 'option' ) . '
'; + $top_callout = '
'; + $top_callout .= get_field( 'before_post_callout', 'option' ); + $top_callout .= '
Recent Profiles
'; + ob_start(); + set_query_var( 'max_profiles', 4 ); + set_query_var( 'context', 'bumper' ); + get_template_part( 'template-parts/content/content', 'directory' ); + $top_callout .= ob_get_clean(); + $top_callout .= '
'; } else { ob_start(); ?> diff --git a/style.css b/style.css index 3ed372a..4b57197 100755 --- a/style.css +++ b/style.css @@ -215,6 +215,14 @@ body.logged-in .menu-item.logged-in { text-decoration: none; } +.callout .the-directory.directory-bumper { + margin: 0; + padding: 0; +} +.the-directory.directory-bumper .directory { + margin: 0; +} + @media only screen and (min-width: 768px) { .the-directory .directory { grid-template-columns: repeat(4, 1fr);