0

We have a sidebar consisting of some text.

The client/owner will want to change the sidebar text occasionally. Out of the box he'll have to do this by navigating:

-> Admin menu
-> Appearance
-> Widgets
-> look past the "Available Widgets" (all of which are irrelevant to him) to Primary Sidebar on the right hand side
-> Dropdown
-> now he can edit the content

He's going to be baffled that he can't edit this type of content as quickly and easily as he can a "Page". Or he'll forget where to find it.

Is there a way to add a link to our Primary sidebar to the main admin menu?

0

I think that using standard WP featurs there's no shortcut. But you can workaround using a custom widget.

As example create a very simple widget, something like:

class MyPageWidget extends WP_Widget { 
    function __construct() {
      parent::__construct( 'MyPageWidget', 'My Page Widget' );
    }
    function widget( $args ) {
        $page = get_page_by_path('sidebar-page');
        if ( ! empty($page) ) {
          echo $args['before_widget'];
          echo apply_filters('the_content', $page->post_content);
          echo $args['after_widget'];
        }
    }
}

add_action('widgets_init', function() { register_widget('MyPageWidget'); } );

This few lines of code, add a new widget for your site, with no options, it simply display the content of a page that has the slug 'sidebar-page'.

Now where you have your text widget, replace with this one.

Create a page and assign the slug 'sidebar-page'.

Now everything you add in that page is displayed in the sidebar: edit a sidebar widget text is simply as edit a page, in effects, it consists in just edit a page.

  • i'll try it and let you know – hawbsl Dec 9 '13 at 10:40
0

Widgets are not really meant to be frequently edited. They are semi-static content meant to be configured on site setup and more or less left alone. If you have built a site that requires frequent widget edits, you've probably made a bad design decision. Without knowing the details of the project, it is hard to say.

One thing that you can do to reduce the confusion is remove the widgets your client doesn't need.

  • i'm sure it's possible we're using the wrong tool. i'll look at your link – hawbsl Dec 9 '13 at 10:39
  • I am fairly certain that you are using the wrong tool but your description is not sufficient to tell me what tool might be a better one. – s_ha_dum Dec 9 '13 at 15:01

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.