WordPress.org

Forums

Sermon Manager
[resolved] Sermon posts on front page (3 posts)

  1. gregwiley
    Member
    Posted 2 years ago #

    I may be missing something obvious but how do I get to include sermons in the time ordered flow of posts on the front page.

    I'm using WordPress 3.5.1 with theme Suffusion 4.4.6.

    Any help gratefully received.

    Cheers, Greg.

    http://wordpress.org/extend/plugins/sermon-manager-for-wordpress/

  2. Jack (wpforchurch)
    Member
    Plugin Author

    Posted 2 years ago #

    Since sermons are quite different from regular posts, they are not intended to be in the blog listing. You can do it though by adding this to your theme's functions.php:

    add_filter( 'pre_get_posts', 'my_get_posts' );
    
    function my_get_posts( $query ) {
    	if ( is_home() && $query->is_main_query() )
    		$query->set( 'post_type', array( 'post', 'wpfc_sermon' ) );
    	return $query;
    }

    Reference: http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page

  3. gregwiley
    Member
    Posted 2 years ago #

    Thanks, I tried that (that very link in fact) but it didn't work. I suspect because of the complexity of the theme I'm using. I'll have some time to think about this more deeply in the next couple of days.

    Cheers, Greg.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Sermon Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic