• Resolved jschmidtsbss

    (@jschmidtsbss)


    I want to display the latest message on the initial podcast page, but I want the details of the message to appear such as the player, the mp3 download etc. If I click on a summary list and pick that sermon then I get what I am looking for and it always appears with a url of …/sermons/my-message-name. The issue here is I don’t want to maintain this area on the site. If I use the short code [sermons per_page=”1″] I will always get the latest sermon but not in the detail format I want like i get when I click on a sermon from a summary list such as when I use the short code [sermons].

    How can I accomplish the goal?

Viewing 1 replies (of 1 total)
  • Hi,

    If I understood correctly, you want to display one sermon with the same layout as it has on sermon archive page (https://example.com/sermons/my-message-name).

    If that is correct, please add this code to your theme’s functions.php:

    
    add_filter( 'sm_shortcode_sermons_single_output', function ( $return, $sermon ) {
    	?>
        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
            <h1 class="entry-title"><?php the_title(); ?></h1>
    		<?php wpfc_sermon_single(); ?>
        </div>
    	<?php
    }, 10, 2 );
    

    Note: This will affect output of sermons on all pages where shortcode is used.

    Also, you will have to download development version of Sermon Manager for the code to work, since the new filter will be available from next release.

    To use the development version, please do the following:

    1. Download the ZIP file from here
    2. Deactivate and delete existing Sermon Manager plugin
    3. Install and activate the development plugin ZIP file

    Note: No sermon data will be lost during the process; and you will get future updates normally.

Viewing 1 replies (of 1 total)
  • The topic ‘Display details of Latest Sermo’ is closed to new replies.