Title: dynamic sidebar (right-column) posts&#8230;
Last modified: August 18, 2016

---

# dynamic sidebar (right-column) posts…

 *  [bryko](https://wordpress.org/support/users/bryko/)
 * (@bryko)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/dynamic-sidebar-right-column-posts/)
 * Hello,
    so I have two big problems… I am a guite newbie in PHP and I am coding
   an complicated site in WP :o. I’ll try to explain what I’d like to do.
 * Imagine simple two-column layout; for example, the site is of the school-like
   institution that organizes lectures and workshops. Now, we have a main page: 
   on the left there is a list of news (short, full-text posts from the last month
   are shown). In the right column, there are short notes describing: the next lecture,
   the workshops for students, the workshops for teachers and a list of sponsors;
   all with little images. They will not be ‘excerpts’; their aim is just to give
   a visitor an overview of what’s going on.
 * These right-column notes will be changing, all but the sponsors rather often,
   i.e. there is a new lecture every week. They do not need to be archived (so I
   imagine opening and overwriting each of them during each update).
 * 1. My first question is how do I make such a list of post that would show only
   and always in the sidebar? The simplest probably would be to make all of them
   in a special category, like ‘sidebar’. But then – read on.
 * Imagine somebody arrives on the main page and clicks the ‘next lecture’ note.
   He/she is then transfered to a new page where in the left is the description 
   of the new lecture followed by an archive of the previous lectures, and in the
   sidebar the lecture note disappear (all remaining notes remain as they were).
   Similar mechanism acts when one clicks ‘workshops’ note: he/she is taken to the
   list and short descriptions of the workshops in the left, and the respective 
   note on the right vanishes.
 * 2. The above means that I need a setup where the contents of the sidebar would
   be dependent on what is loaded in the left side and, as far as I can imagine,
   where each of the notes in the left would be independently manipulated. Say, 
   every note will be in a different unique category that would contain _only_ this
   single note and I would construct a loop like: if the lecture description is 
   loaded in the left, display this and this and this note on the right. So my question
   is how do I make the sidebar-content dependent on the left-column content and
   is my idea of such a ‘dynamic sidebar’ OK?
 * Well, that’s about it. I am sorry for such a long entry, I just hope you know
   what I what to achieve. I would be very very grateful if you could point me to
   the right direction. I am not afraid of learning some PHP 🙂 , I just need some
   ideas and guidance how this should work to be simple and straightforward…
 * This is a real-life example, I am really working on such a website. The institution
   is non-profit and I don’t get any money or fame 🙂 for making this website. I
   wasn’t even asked to do it, it is just that I like the organisation very much
   and their current website is a crap. And besides, I’d like to learn WP :).
 * cheers
    jb

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Lorelle](https://wordpress.org/support/users/lorelle/)
 * (@lorelle)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/dynamic-sidebar-right-column-posts/#post-241999)
 * Honestly, the short answer is to probably use “asides” or a “mini-loop” in the
   sidebar.
 * Here are some articles that may help:
 * [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
    [http://codex.wordpress.org/The_Loop_in_Action](http://codex.wordpress.org/The_Loop_in_Action)
   [http://codex.wordpress.org/Customizing_Your_Sidebar](http://codex.wordpress.org/Customizing_Your_Sidebar)
   [http://codex.wordpress.org/Adding_Asides](http://codex.wordpress.org/Adding_Asides)
 * And if this is overwhelming, then start with these two articles first and you
   can enter the other articles armed and ready.
 * [http://codex.wordpress.org/Stepping_Into_Templates](http://codex.wordpress.org/Stepping_Into_Templates)
   
   [http://codex.wordpress.org/Stepping_Into_Template_Tags](http://codex.wordpress.org/Stepping_Into_Template_Tags)
 * There might be another way and that is to feature a specific category in your
   sidebar as a feed, but someone else here will have to explain how that works.
 * [http://codex.wordpress.org/WordPress_Feeds](http://codex.wordpress.org/WordPress_Feeds)
   
   [http://codex.wordpress.org/Customizing_Feeds](http://codex.wordpress.org/Customizing_Feeds)
 *  Thread Starter [bryko](https://wordpress.org/support/users/bryko/)
 * (@bryko)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/dynamic-sidebar-right-column-posts/#post-242601)
 * Hello,
    thanks a lot for the links! Well, I knew them before, so this time I 
   just tried harder 🙂 So far I got stuck in trying to manipulate sigle sidebar
   posts. Example: say I have three posts in the sidebar, entitled: cats, dogs and
   rabbits. I would like to have the loop going on something like this: “if this
   post belongs to the category ‘sidebar’ and if its title is ‘cats’, show it” But
   somehow I am not able to get the condition: `if (in_category('1') and the_title()
   =='cats') { blah blah blah }` work… I guess there must be something wrong with
   the notation of the ‘the_title()==’cats’, but I have tried lots of different 
   combinations and nothing seems to work.
 * I would be extremely grateful for help…!
 * jarek`
 *  [mir123](https://wordpress.org/support/users/mir123/)
 * (@mir123)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/dynamic-sidebar-right-column-posts/#post-242617)
 * Check this [http://wordpress.org/support/topic/37666#post-212540](http://wordpress.org/support/topic/37666#post-212540)
   which could be useful.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘dynamic sidebar (right-column) posts…’ is closed to new replies.

## Tags

 * [asides](https://wordpress.org/support/topic-tag/asides/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [mir123](https://wordpress.org/support/users/mir123/)
 * Last activity: [20 years, 8 months ago](https://wordpress.org/support/topic/dynamic-sidebar-right-column-posts/#post-242617)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
