Add archive/category results to single post page

Figured it out. A conditional in content.php in template-parts/ checked whether the content is_archive. I assume the functionality behind is_archive is whether the file was launched from archive.php. Since it wasn’t it didn’t fire.

Final step was redirecting to a custom content-post-type.php in template-parts that doesn’t have the is_archive check. Seems like it all works right now. Thanks to birgire for the nudge.

So my final single.php goes:

<?php
    while ( have_posts() ) : the_post();

        get_template_part( 'template-parts/content', get_post_format() );

            the_post_navigation();

        // If comments are open or we have at least one comment, load up the comment template.
        if ( comments_open() || get_comments_number() ) :
            comments_template();
        endif;

    endwhile; // End of the loop.
    ?>
        
    <!--ADD AN ARCHIVE FOR php echo $post->post_name -->
        
    <?php 
        $page_title = $wp_query->post->post_title;
        $args = array(
            'post_type' => 'pdsh_posts',
            'posts_per_page' => -1,
            'orderby' => 'title',
            'order'   => 'ASC',
            'tax_query' => array(
                array(
                    'taxonomy' => 'category',
                    'field'    => 'slug',
                    'terms'    => $page_title,
                    //'terms'    => $post->post_name,//
                ),
            ),
        );
        $my_query = new WP_Query( $args );
        while ( $my_query->have_posts() ) : $my_query->the_post();
            //the_excerpt();
            get_template_part( 'template-parts/content-pdsh', get_post_format() );
        endwhile; 
    ?>

Where “pdsh_posts” is a custom post type.