• https://www.ads-software.com/support/topic/using-sermon-post-type-in-a-specific-page-without-shortcodes?replies=1

    I asked this question here but support over there is spotty, and the question is more of a query issue than a Sermon Manager issue.

    I have an addon that create a custom post type, wpfc_sermon

    I would like to display all of these posts in a summary list on a specific page with a slug sunday-messages. I have tried custom page templates. I have tried queries, and replacing index.php with a custom type and calling it from functions.php.

    Can anyone outline the BEST way to do this? I am using a theme and child theme, and I already have custom PHP which modifies the normal post type ‘post’. So with my custom code, I am running into themeing u=issues with this new post type, because it is still seen as is_single() on the single pages. This is fine, and i can actually work with this and theme it the same way. Problem is that the only way I can display the sermon post type summary is through a shortcode, which does not give it the property is_home().

    I am sure this is an easy fix and I am just missing it.

    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( 'custom-content', get_post_type() ); ?> <!-- This is pointing the god-stories page at the custom-content.php -->
    <?php endwhile; ?>

    Is the code in my index.php which calls my normal post type- I am sure if I could modify this to reflect the new post type I could figure it out with custom page templates. I cannot modify the_post() and get the php to not error out for the life of me.

    Thanks for the help in advance!

  • The topic ‘Custom Post Type in specific page, not home() or single()’ is closed to new replies.