Support » Plugin: Sermon Manager » Image size shortcode

  • Hi,
    I’m using the shortcode [sermon images] and want to change the size of the image to make it smaller. However the suggest shortcode size=”sermon_small” doesn’t seem to make any difference. Could you advise?

    thanks

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’ve already mentioned this and notified the new owner. Will see if this ever gets fixed.

    https://wordpress.org/support/topic/bug-cant-change-sermon_images-size/

    In our case, I wanted to display a “Series Archive Page” (https://faithcommunitybible.org/series/) and a “Preacher/Speaker Archive Page” (https://faithcommunitybible.org/speakers/). I created two custom pages and added the following:

      <?php
        $terms = apply_filters( 'sermon-images-get-terms', '', array( 'taxonomy' => 'wpfc_sermon_series' ) );
          if ( ! empty( $terms ) ) { 
            echo '<div class="grid-wrapper archive-wpfc_series">';
            foreach( (array) $terms as $term ) { 
              echo '<div class=""><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'fcbc-medium' ) . '';
              echo '<h3>' . sprintf( __( "%s" ), $term->name ) . '</h3></a></div>';
            } 
            echo '</div>';
          }
      ?>

    This was for the Series page and we use a custom image size, fcbc-medium, but any size will work as long as it’s registered.

    Also, these divs are from our theme, so you will need to either use your own or style them if you need to.

    Thanks. Where should I add the code?

    You need to create a custom page.

    https://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/

    If you look on that page I linked, you will need to add the code I posted above between the ‘Main’ section:

    <main id="main" class="site-main" role="main">
    
    <?php
        $terms = apply_filters( 'sermon-images-get-terms', '', array( 'taxonomy' => 'wpfc_sermon_series' ) );
          if ( ! empty( $terms ) ) { 
            echo '<div class="grid-wrapper archive-wpfc_series">';
            foreach( (array) $terms as $term ) { 
              echo '<div class=""><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'fcbc-medium' ) . '';
              echo '<h3>' . sprintf( __( "%s" ), $term->name ) . '</h3></a></div>';
            } 
            echo '</div>';
          }
      ?>
    
    </main><!-- .site-main -->

    Thanks, I got this working.. except my image is full width…rather than being smaller. sorry, I’m new to this so maybe I’m missing something basic. http://erskine.church/test-series
    is my try out.
    thanks, appreciate your help!

    No problem. You’ll need to edit the image size here: wp_get_attachment_image( $term->image_id, 'fcbc-medium' ). Like I said earlier, we use a custom image size (fcbc-medium). You will need the change the size. I’m not famiar with your theme, so I don’t know what custom sizes your theme uses, but if use use ‘thumbnail’, ‘medium’, that should work as well. I think Sermon Manager uses some custom sizes too (sermon_small,sermon_medium and sermon_wide).

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.