Hello @ratamatcat
Thank you for getting back and clarifying the issue.
The Media: Selected in the targeting option are for the images, graphics, audio, file or video in the media library of the WordPress site and not the PHP template.
If you want to display a popup for the PHP template, I believe you will need the Advanced Targeting Conditions extension plugin – Custom Conditions and create custom code for this.
The way the Media: Selected works is when a user checks the attachment URL of a media like for example a pdf file, it will display the popup. Please see the below example. The popup is using a Trigger: Time Delay/Auto Open with a targeting condition – Media: Selected – PDF file.
https://share.getcloudapp.com/Apuzjqlk
If I load the attachment URL of the PDF file, it will display the popup – https://share.getcloudapp.com/qGu5dnY4
I hope that helps.
Let us know if you have any questions or clarification on this matter.