• Resolved chrisgollop81

    (@chrisgollop81)


    Hi, I have this plugin for podcasting and would like to link the podcasts to a category rather than a series, for the sake of front page design. The great guys at the plugin have provided the code to paste into functions.php –

    add_action( ‘init’, ‘ssp_add_categories_to_podcast’ );
    function ssp_add_categories_to_podcast () {
    register_taxonomy_for_object_type( ‘category’, ‘podcast’ );
    }

    However, within the category on my site, only posts show up and not podcasts even though they are both marked under a given category.

    I hope I’m not missing anything obvious.

    Thanks for any help

    Chris

    https://www.ads-software.com/plugins/seriously-simple-podcasting/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Hugh Lashbrooke

    (@hlashbrooke)

    I have updated the guide to show you how to get this working: https://www.seriouslysimplepodcasting.com/documentation/how-do-i-use-my-blog-categories-with-my-podcast-episodes/

    Sorry for the delay in responding!

    Hi there!

    Fantastic plugin man… srsly.

    So I’ve read your updated documentation above in relation to getting podcasts to display in archive categories.

    I added both sections of code to functions.php.

    I am currently unable to get an answer from the theme Dev as to how to get it to work on Lovecraft.

    Any chance you can comment on how to modify my archive.php file to include thepodcasts?

    <?php get_header(); ?>
    
    <div class="wrapper section">
    
    	<div class="section-inner">
    
    		<div class="content">
    
    			<div class="page-title">
    
    				<div class="section-inner">
    
    					<h4><?php if ( is_day() ) : ?>
    						<?php printf( __( 'Date: %s', 'lovecraft' ), '' . get_the_date( get_option('date_format') ) . '' ); ?>
    					<?php elseif ( is_month() ) : ?>
    						<?php printf( __( 'Month: %s', 'lovecraft' ), '' . get_the_date('F Y') . '' ); ?>
    					<?php elseif ( is_year() ) : ?>
    						<?php printf( __( 'Year: %s', 'lovecraft' ), '' . get_the_date( 'Y' ) . '' ); ?>
    					<?php elseif ( is_category() ) : ?>
    						<?php printf( __( 'Category: %s', 'lovecraft' ), '' . single_cat_title( '', false ) . '' ); ?>
    					<?php elseif ( is_tag() ) : ?>
    						<?php printf( __( 'Tag: %s', 'lovecraft' ), '' . single_tag_title( '', false ) . '' ); ?>
    					<?php elseif ( is_author() ) : ?>
    						<?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
    						<?php printf( __( 'Author: %s', 'lovecraft' ), $curauth->display_name ); ?>
    					<?php else : ?>
    						<?php _e( 'Archive', 'lovecraft' ); ?>
    					<?php endif; ?>
    
    					<?php
    					$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    					if ( "1" < $wp_query->max_num_pages ) : ?>
    
    						<span><?php printf( __('(Page %s of %s)', 'lovecraft'), $paged, $wp_query->max_num_pages ); ?></span>
    
    						<div class="clear"></div>
    
    					<?php endif; ?></h4>
    
    				</div> <!-- /section-inner -->
    
    			</div> <!-- /page-title -->
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php rewind_posts(); ?>
    
    				<div class="posts" id="posts">
    
    					<?php while ( have_posts() ) : the_post(); ?>
    
    						<?php get_template_part( 'content', get_post_format() ); ?>
    
    					<?php endwhile; ?>
    
    				</div> <!-- /posts -->
    
    				<?php lovecraft_archive_navigation(); ?>
    
    			<?php endif; ?>
    
    		</div> <!-- /content -->
    
    		<?php get_sidebar(); ?>
    
    		<div class="clear"></div>
    
    	</div> <!-- /section-inner -->
    
    </div> <!-- /wrapper.section -->
    
    <?php get_footer(); ?>

    Thanks much for any assistance you can provide!

    Thread Starter chrisgollop81

    (@chrisgollop81)

    That’s awesome thanks very much. Problem solved!

    Dear Hugh Lashbrooke,
    I added the two parts of code provided in your help documentation.
    The problem is solved but not completely.
    Now the podcasts show up in my home page, but when I choose to display the posts of a category and the podcasts are included in that category, the podcasts do not show up with other posts in that category.

    Any help is highly appreciated in advance.
    Best,
    Omid.

    It’s a bit late, but I had the same problem today. I found this snippet that has to be put in the Theme’s functions.php or (what I prefer) a custom plugin. Now, the matching podcast episodes are shown in the category/tag archives.

    /* Podcast in Tag/Category Archives START */
    function add_custom_types_to_tax( $query ) {
    if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    
    // Get all your post types
    $post_types = get_post_types();
    
    $query->set( 'post_type', $post_types );
    return $query;
    }
    }
    add_filter( 'pre_get_posts', 'add_custom_types_to_tax' );
    /* Podcast in Tag/Category Archives END */
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Category linking with Seriously Simple Podcast’ is closed to new replies.