[resolved] add my js to specfic page (2 posts)

  1. chknabeel
    Posted 5 years ago #

    Hi Everyone,

    I m writing a plugin first time and I got stuck in one problem. My plugin requires jquery ui library and I have included it in the header successfully with wp_enqueue_script function of wordpress.
    But the problem is that, it is included in the all pages including admin pages. Due to which it conflicts with built in js functions of wordpress. Due to this conflict if I go to add new page in the admin or edit any page the html and visual tabs does not work.
    Please help me, is there a way I can include my js only to specified page?

    Thanks in Advance

  2. chknabeel
    Posted 5 years ago #

    I think no body has a solution. Anyways I found an alternate solution for me. I just used following if condition:

    if (!is_admin()) {
    //my js code

    Now my admin is working perfect.


Topic Closed

This topic has been closed to new replies.

About this Topic