Selecting Specific Single.php Template in Function

Posted in: Newsmag
Post count: 5

I would like to add a function that specifically selects one single.php file, and excludes the others. The function currently uses the following code to select single.php.

if ( is_single() ) :

The problem is this function applies to ALL “single” template files like single_template_1,single_template_2, etc. How can I make it ONLY execute on single.php, and not on single_template_(#).php?

Thanks!

Post count: 9544

target the post ID

Wordpress codex is font of wisdom:

https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page

Post count: 5

Awesome that works. Could you please delete this thread for me? Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newsmag’ is closed to new topics and replies.