0

When using WordPress, I can easily identify pages using is_page('100') or is_front_page(), is_home, is_single() etc... But, I have built a custom PHP script and included into WordPress using:

define( 'WP_USE_THEMES', false );
require($_SERVER['DOCUMENT_ROOT'].'/wp-load.php');
get_header();

Is there any way to identify what page this is from within functions.php?

I want to enqueue some scripts ONLY on this page but don't know how to identify when I'm on it.

  • Why is this not just a custom page template? – Jacob Peattie Jul 24 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.