For starters, my background is in html and minor css coding. I was brought on to manage and tweak a layout for a site that had been built by a third party. It’s a custom theme and I have run into an issue that is outside of my depth of knowledge and after two days of researching I’m no closer to getting this figured out.
An example of the issue on this page: http://nast.org/affiliates/sdmn/sdmn-calendar/
The issue is when a page is password protected in WordPress, the Input Password text box that appears can’t be typed into. Text can be pasted into it, but no input directly. I’ve changed themes, and the text box works properly. I’ve disabled all add-ons and re-enabled one by one, but none of them fixed the issue. When the Advanced Custom Fields plugin is disabled, the text box disappears completely however.
When I inspect the element, I get a JS error: UncaughtType Error... Navgoco is not a function
. The plugin wasn’t installed, so I assumed this was remnant code from an earlier build. I installed the navgoco plugin, hoping it would correct itself but it didn’t.
// Initialize navgoco with default options
$(".main-menu").navgoco({
caret: '<span class="caret"></span>',
accordion: false,
openClass: 'open',
save: true,
cookie: {
name: 'navgoco',
expires: false,
path: '/'
},
slide: {
duration: 300,
easing: 'swing'
}
});
Other password field issues I’ve seen seem to be due to an error in the functions.php. There is nothing in my functions.php relating to passwords so I don’t know if I’m missing something there.
Tl;Dr – Password box doesn’t have input, text can only be pasted in. The issue seems to stem from either:
- Advanced Custom Fields plugin which is a pre-req for the password text box appearing.
- A javascript error.
- Missing code in the functions.php
Sorry for the wall of text, but I’m in over my head and any help would be appreciated. Thanks!
The reason your plugin is not working is because you’ve loaded jQuery twice. The second one comes after the plugin link, and overrides the first jQuery, and your function is not defined on the new
$
.comment out the second jquery reference (line 115):
Your other issue, the weirdly disabled password input, is possibly not related at all. It’s coming from line 68 (not sure what this is, bootstrap is in version 3 still right?), which commenting fixed: