0

I can't save widget. When I click save, I can see wait circle, and nothing happend. When I visit again widgets section, it's empty.

Then I changed view to Accessibility Mode, and still no luck.

Then I've changed id in functions, because that's the place where I create my widgets, and all those widgets I've tried to add before were in inactive widgets, but still can't save any.

Also theme doesn't show anythyng.

What can I do to make it work?

UPDATE

// add widgets
function iu_widgets_init() {
    register_sidebar(array(
        'name'          => __('disp name', 'dev'),
        'id'            => 'footerBoxOne',
        'description'   => __('disp desc', 'dev'),
        'before_widget' => '',
        'after_widget'  => '',
        'before_title'  => '<h4><span class="title">',
        'after_title'   => '</span></h4>',
    ));
    register_sidebar(array(
        'name'          => __('disp name', 'dev'),
        'id'            => 'footerBoxTwo',
        'description'   => __('disp desc', 'dev'),
        'before_widget' => '',
        'after_widget'  => '',
        'before_title'  => '<h4><span class="title">',
        'after_title'   => '</span></h4>',
    ));
    register_sidebar(array(
        'name'          => __('disp name', 'dev'),
        'id'            => 'footerBoxThree',
        'description'   => __('disp desc', 'dev'),
        'before_widget' => '',
        'after_widget'  => '',
        'before_title'  => '<h4><span class="title">',
        'after_title'   => '</span></h4>',
    ));
    register_sidebar(array(
        'name'          => __('disp name', 'dev'),
        'id'            => 'footerBoxFour',
        'description'   => __('disp desc', 'dev'),
        'before_widget' => '',
        'after_widget'  => '',
        'before_title'  => '<h4><span class="title">',
        'after_title'   => '</span></h4>',
    ));
}
add_action('widgets_init', 'iu_widgets_init');

of course dev is my theme slug. Could that be a problem?

  • 1
    Have you tried turning on Debugging? Do you get any errors? – Howdy_McGee Mar 24 '15 at 13:59
  • 1
    @miszczu If you have no errors ( even in your debug.log file ) and you've turned off all plugins then the next step it to actually show your code. Tell us what each function does, what you expect to happen, where the code is saved, etc. Otherwise all possible answers will be guesswork. – Howdy_McGee Mar 24 '15 at 14:33
  • 1
    Thank you all. I just took code from codex, I've changed footerBoxOne to footer-box-1 for all four widgets, and it's working now. Maybe uppercase chars were the problem – miszczu Mar 24 '15 at 14:59
  • 1
    Indeed, you are right - make it an answer. – Nicolai Mar 24 '15 at 15:03
  • 1
    So obvious, we all missed it. Just goes to show how easy it is to miss something so obvious :-) – Pieter Goosen Mar 24 '15 at 15:29
1

Thank you all. I just took code from codex, I've changed id footerBoxOne to footer-box-1 for all four widgets, and it's working now. I guess uppercase chars were the problem

  • 1
    id is actually a slug value. Slugs should always be lowercase and if it has more than one word, these words should be separated with hyphens only. As I said, very obvious but we all missed that. We all deserve that noddy badge :-). +1 – Pieter Goosen Mar 24 '15 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.