Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Add this to your functions.php or functionality plugin

View single-id-template.php
1 2 3 4 5 6
<?php
function my_single_template_by_post_id( $located_template ) {
return locate_template( array( sprintf( "single-%d.php", absint( get_the_ID() ) ), $located_template ) );
}
add_filter( 'single_template', 'my_single_template_by_post_id' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.