• Hello!

    Does anyone know how could I target a specific admin url?
    I want to add a script via function.php to my ‘Add New CPT’ page. Not on the edit page, only on the add new page.

    How could I target this URI: ‘/wp-admin/post-new.php?post_type=property’ in an ‘if’ statement for example?

    Thanks!

    • This topic was modified 4 years, 11 months ago by wendath.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    It depends on what hook you are using to do something. In some cases the current screen ID is passed to the callback. Failing something passed, the requested URL can be taken from the $_SERVER array of information.

Viewing 1 replies (of 1 total)
  • The topic ‘Targeting a specific admin url’ is closed to new replies.