Programming Tooling

Slimming Down (III): Context Sensitive Sidebars

We need dif­fer­ent side­bars: The tag cloud makes sense only on the side­bar of the search page. There it can short­en the search in the set of arti­cles. On the oth­er pages, it dis­tracts the read­er. Con­verse­ly, the oth­er pages need a ‘more’ but­ton in the side­bar that leads to the sur­vey page. In oth­er words, we need (at least) two dif­fer­ent side­bars:

[ en | de ]


  • Design­ing the side­bar for the post-sur­vey page:
    • Install the plu­g­in ‘Cus­tom Side­bars’ via the Word­Press Back­end.
    • Open Appearance/Widgets and cre­ate a sec­ond side­bar myplp.
    • Add a text field to the wid­get myplp con­tain­ing the mes­sages addressed to the users of the search page.
    • Add a Cool Tag Cloud instance to the wid­get myplp as you did it for the stan­dard side­bar
    • In the wid­get myplp, assign Side­bar Location/For Archives/As Side­bar for select­ed Archive Types/ to Post Index
  • Design­ing the gen­er­al default side­bar for all oth­er pages:
    • Select any new more-image and load it up into the media library.
    • Add an image field to the stan­dard default side­bar now called theme side­bar
    • Insert the uploaded image into that field and link it to the page https://yourdomain/myplp


What’s the effect? The default side­bar is dis­played on all pages, except on your post list page. Thus, your read­er can reach the sur­vey page with one click. And the tag cloud, by which you can eas­i­ly get clus­tered sub-lists, is only dis­played on the post-sur­vey page.

Good to know is, that Cus­tom Side­bars is Open-Source soft­ware. Its repos­i­to­ry con­tains a GPL‑2.0 license and the respec­tive readme.txt con­tains a GPL‑2.0 licens­ing state­ment.

To top