• Resolved HelgaTheViking

    (@helgatheviking)


    does the conditional is_page_template() accept arrays?

    is_page_template( array(‘about.php’,’template-page-test.php’) )

    i read this somewhere, (not in the Codex- though the Codex suggests that arrays are accepted by is_page). it seems like they ought to accept the same types of inputs, but cannot seem to make it work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • is_page_template does not accepts array as argument, you need to provide a string..

    the conditional is_page_template() does not accept arrays;
    as far as i can judge this from looking into the core files.
    /wp-includes/post-template.php (line 1220+)

    is_page() does indeed accept arrays.

    Thread Starter HelgaTheViking

    (@helgatheviking)

    thanks everyone. my attempts to use arrays were failing, i just wanted to verify. bummer, would be cool if it took arrays like is_page().

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘does is_page_template() accept arrays’ is closed to new replies.