Title: Targeting a specific admin url
Last modified: March 28, 2020

---

# Targeting a specific admin url

 *  [wendath](https://wordpress.org/support/users/wendath/)
 * (@wendath)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/targeting-a-specific-admin-url/)
 * 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 6 years, 2 months ago by [wendath](https://wordpress.org/support/users/wendath/).

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/targeting-a-specific-admin-url/#post-12596145)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/targeting-a-specific-admin-url/#post-12596145)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
