-
you can either disable click events using CSS.
.linkclass { pointer-events: none;}
-
Or better Modify the template and remove the part which creates anchor links for titles.
note: with the above, it is still possible to access the page by directly putting the full URL in the browser. if you want to completely remove the single page.
add_action('register_post_type_args', function ($args, $postType) {
if ($postType !== 'post'){
return $args;
}
$args['publicly_queryable'] = false;
return $args;
}, 99, 2);