Can I be able to load JQUERY inside wp-admin/post-new.php
-
Hi,
I am customizing my new own theme which is using function.php to implement custom fields for posts write panel. Some of my field for example and Image upload field needs the option to clone the field in order to make the user upload many images and store the links in custom field records.
To do this I need to enable Jquery inside the admin (wp-admin/post-new.php) page and have gone several hours searching for a solution through the forum and documents.I was able to implement is using the following technique inside my theme function.php file, however I know that is not the right way to do it.
if (is_admin()){ function loadjquery(){?> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-1.4.1.min.js"></script> <?php } add_action("admin_head","loadjquery"); ?>
I did try using the function
wp_enqueue_script('jquery');
but the admin page header did not load jquery to it.Can any one of you please tell how to make it possible. What I am trying to do here is use a Jquery plugin called relCopy inside add new post page in admin section.
- The topic ‘Can I be able to load JQUERY inside wp-admin/post-new.php’ is closed to new replies.