Title: Admin area for Javascript not showing
Last modified: November 10, 2024

---

# Admin area for Javascript not showing

 *  Resolved [Kwaku Dzaho](https://wordpress.org/support/users/dzaho/)
 * (@dzaho)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/)
 * Hi,
 * I have 2 site with the same plugin versions installed.
 * On one site, the option to choose “Admin area” location is not available for 
   Javascript snippets but it is available on the other site.
 * Can you please let me know what the issue might be. I have attached screenshot
   from both site.
 * Thank you in advance,
 * [https://ibb.co/w4PZc2n](https://ibb.co/w4PZc2n)
   [https://ibb.co/R7VSDLL](https://ibb.co/R7VSDLL)
 * Kwaku.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18126395)
 * Hi [@dzaho](https://wordpress.org/support/users/dzaho/),
 * I can’t think of any reason for those locations to be missing there unless there’s
   some type of conflict with another plugin. The “frontend” mention next to the
   Site Wide locations has been added at the same time with the Admin locations.
   The admin locations don’t have any restrictions as to what code type can be used
   for them.
 * Can you please check if the same issue happens with all the WPCode snippets disabled
   and with other plugins disabled?
 *  Thread Starter [Kwaku Dzaho](https://wordpress.org/support/users/dzaho/)
 * (@dzaho)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18127060)
 * Yes, you are right. It is a CSS WPCode snippets when assigned to Admin area location
   disables the option for Admin area for Javascript.
 * How is that possible and how I can fix it. I still want to load the CSS snippet
   in Admin only.
 * Thank you
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18127087)
 * Hi [@dzaho](https://wordpress.org/support/users/dzaho/),
 * If disabling the CSS snippet makes the options available again it might be that
   your snippet is interfering with the elements added through the styles.
 * I’m not sure how that is happening since those elements don’t have a css class
   that is specific to them but it depends on your CSS code – if you can share the
   code of your snippet we can try to replicate on our end.
 *  Thread Starter [Kwaku Dzaho](https://wordpress.org/support/users/dzaho/)
 * (@dzaho)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18127537)
 * Here are the code snippets
 *     ```wp-block-code
       /* HIDE Monster Icon */.monsterinsights-quick-links, .monsterinsights-float-right {	display: none!important;}#monsterinsights_reports_widget {	padding: 50px 0;}#monsterinsights_reports_widget .ui-sortable-handle {	display: none!important;}/* Replace plugin logo */.monsterinsights-logo-area img {    content: url('https://www.domain.com/wp-content/uploads/2024/11/Nation-Media-Dashboard-FX.png');    /* Adjust size if needed */    width: 200px; /* Adjust width */    height: auto; /* Maintain aspect ratio */}#adminmenu .udb-admin-logo-wrapper a {	padding: 8px 6px!important; }.sticky-wcp-custom-form {	margin-top: 50px;}.ui-resizable .wcp-container {	background-image: url(https://www.domain.com/wp-content/uploads/2024/11/Nation-Media-File-Organizer.png);    background-size: 70%;    background-position: top;    height: 90px !important;    display: block;    background-repeat: no-repeat;	margin-top: 25px;}.event-img {	padding-left: 20px;    top: 10px;    position: absolute;}/*.index-php h1	{	display: flex !important;	padding-left:5px;}.logo-text-wrapper {     display: flex;     align-items: center;     gap: 10px;}.logo-text-wrapper img {     vertical-align: middle;}*/.monsterinsights-navigation-bar .monsterinsights-reports-navigation li:nth-last-child(-n+3) {    display: none!important;}.monsterinsights-navigation-bar .monsterinsights-reports-navigation li:nth-child(3),li:nth-child(5), li:nth-child(6),li:nth-child(7) {    display: none!important;}
       ```
   
 *     ```wp-block-code
       jQuery(document).ready(function($) {    // Get the user's first name from PHP    var userFirstName = '<?php echo do_shortcode("[user_first_name]"); ?>';        // Update the header in .index-php page with image and welcome message    $('.index-php h1').html(<br>        <div class="logo-text-wrapper"><br>            <a href="https://domain.com/technology/#dashboard-fx/" target="_blank"><br>                <img width="200px" src="https://www.domain.com/wp-content/uploads/2024/11/Nation-Media-Dashboard-FX.png" alt="Nation Media Logo"><br>            </a><br>            <h1>Hello ${userFirstName}, Welcome to the Nation Media Dashboard FX!</h1><br>        </div><br>);});// Link the LogosjQuery(document).ready(function($) {    // Remove any existing anchor tags around the logo    $('.monsterinsights-logo-area').unwrap('a');    // Wrap the logo in your new anchor tag    $('.monsterinsights-logo-area').wrap('<a href="https://domain.com/technology/#dashboard-fx/" target="_blank"></a>');});
       ```
   
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18127689)
 * Thank you for sharing the code [@dzaho](https://wordpress.org/support/users/dzaho/)
 * Your code is hiding all li elements with the index 5, 6 & 7, specifically this
   code:
 *     ```
       .monsterinsights-navigation-bar .monsterinsights-reports-navigation li:nth-child(3),
       li:nth-child(5), li:nth-child(6),
       li:nth-child(7) {
           display: none!important;
       }
       ```
   
 * If you want to make the rule apply just for a specific parent element you have
   to repeat the parent element for each of the rules like you have for the element
   with index 3: .monsterinsights-navigation-bar .monsterinsights-reports-navigation
   li:nth-child(3) you need to have that for each element like this: .monsterinsights-
   navigation-bar .monsterinsights-reports-navigation li:nth-child(5)…
 *  Thread Starter [Kwaku Dzaho](https://wordpress.org/support/users/dzaho/)
 * (@dzaho)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18128070)
 * That resolved the issue. Thank you!
 * Another issue in the same JavaScript snippet is that the PHP is commented out
   in the browser console and it does not output.
 *     ```wp-block-code
       var userFirstName = '<?php echo do_shortcode("[user_first_name]"); ?>';
       ```
   
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18131318)
 * Hi [@dzaho](https://wordpress.org/support/users/dzaho/),
 * You can’t use the PHP code like that in a JavaScript snippet.
 * If you want to use PHP like the you can use the Universal Code Type and wrap 
   the code in <script> tags.
 *  Thread Starter [Kwaku Dzaho](https://wordpress.org/support/users/dzaho/)
 * (@dzaho)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18132574)
 * Thank you so much for your support. It all worked.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Admin area for Javascript not showing’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Kwaku Dzaho](https://wordpress.org/support/users/dzaho/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/admin-area-for-javascript-not-showing/#post-18132574)
 * Status: resolved