Sidebars don't save if I leave a page. What do I do so I don't lose my work?

Why do the custom sidebars I create not save when I leave the widgets page? Do I need to export them in order to have access to my work later on? I just did quite a bit of work on a few different sidebars (I saved it elsewhere thank goodness) and I just lost it when I navigated away from the widgets page and back.

Do I need to export them to my computer and re-upload them every time I make any changes? That seems odd... if so, could someone please explain the quickest way to do that?

Thanks in advance for your reply!

Regards,

Dakota

  • Dakota

    Update:

    I think the custom sidebars were deleted because I hadn't assigned them to a type of page or anything and so when I refreshed they were not there. The thing is, each of the sidebars I'm creating are only going to be on one post, so how do I do that?

    I'm trying to display related products in a sidebar, so I've created a custom sidebar for each products page. I know that's not the most efficient way of doing it, but it looks how I want it to and my theme doesn't allow good access to shortcodes, etc. inside of widgets.

    I've been using a sidebar test page to check and see that they are working correctly before I place them on the live pages of my site. Now that I've created them all, when I use the metabox in the page editor to select the proper sidebar, I get no sidebar at all!

    http://acoustagrip.com/sidebar-test/

    I just reimported the sidebars that I saved after I finished editing and when I did that I saw that I had multiple versions of some sidebars. Some of them were empty. When I deleted those and respecified the right sidebar in the metabox of the test page editor, I got what I wanted (shown in the second screenshot).

    So the lesson here, (I think, anyway?) is that the Custom Sidebars don't save your work unless you assign them to some type of page/post.

    Anyone care to confirm?

    Regards,

    Dakota

  • Vaughan

    Hi @dakota,

    I've just tried this, and my sidebar was saved fine even though i hadn't selected a location. At least you have it working though either way.

    Incidentally though. If you want to make sure that shortcodes are supported in your text widget. You can add the following to your theme functions.php

    add_filter('widget_text', 'do_shortcode');

    You should then be able to use shortcodes in any text widget.

    Hope this helps

  • Dakota

    My Theme is out of date, and it may be about time to update. I should update first so I don't have to make that change twice, correct?

    So if I put that in the functions.php file, I'll be able to use shortcodes in my widgets. Great! Is there a similarly simple way to do that for the boxes that my theme offers?

    Do you have any recommendations as to how to store updates that I do so that I can have them when I update my theme?

    Thanks, Vaughn!

    Dakota

  • Jack Kitterhing

    Hi there @Dakota,

    Hope you're well today and thanks for your question! :slight_smile:

    Sorry about the delay on this.

    My Theme is out of date, and it may be about time to update. I should update first so I don't have to make that change twice, correct?

    That's correct, ideally you should use a child theme, that way you can update your main theme and add the modification to the child themes functions.php, we have a great guide on this here https://premium.wpmudev.org/blog/create-wordpress-child-theme/ :slight_smile:

    So if I put that in the functions.php file, I'll be able to use shortcodes in my widgets. Great! Is there a similarly simple way to do that for the boxes that my theme offers?

    Technically you should be able to anyway, but that code just makes sure they are processed. :slight_smile:

    We're here to help.

    Thanks!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.