• Resolved sabino106

    (@sabino106)


    Hi All –

    I have my first website under construction, and I think it’s coming along nicely so far. Thanks to everyone who has provided feedback – it’s very much appreciated, and it truly helps a lot!

    Prototype Site: http://www.all-about-the-house.com

    I have a somewhat more advanced question now which gets into the guts of rendering sidebars. I started, last night, to try to take better advantage of my sidebars: adding some custom images to give the site a better aesthetic. As I started playing with this, I realized: I really *don’t* want to use the same sidebar layout on every page. I don’t think I ever will want advertising on the main page, for example. Furthermore, my “About” page is pretty short – but if I have a LONG sidebar (which is appropriate for my home page and also some single post pages) — it makes the “about” page look, well, kind of goofy!

    Any suggestions as to how to modify these sidebar layouts on a per page basis? I realize I’ll need to edit the theme code, and I’m prepared to do it. But where to start??

    Any/all thoughts, comments and feedback most appreciated. Thank you!

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • You have two main options:

    1) Register separate sidebars for separate locations, and then add calls to those sidebars using conditional tags, such as is_home(), is_page(), etc.

    2) Install the Widget Logic Plugin, and apply conditional tags to specific Widgets

    Thread Starter sabino106

    (@sabino106)

    Thanks, Chip –

    I’ll check this out…

    I have to say, I’m a little wary of installing too many plug-ins as I’m thinking there could surely be compatibility issues with upgrades and the like as time progresses. If I code this myself, I presume (this is a “guess”), I would create a function in functions.php that would be called to assess sidebar rendering. Perhaps I would even call it, “render_sidebar()” or something. I would want this called with every page or post that’s displayed. That being said, two follow-on Q’s:

    1) Where would I call this from?
    2) What does it take to define and register a sidebar?

    Not looking for a tutorial in php coding, of course — but could you possibly point me to the key files and ultra-basic sidebar registration approach?

    Thank you so much for the feedback!

    Clearly on the right path already… 🙂

    Mark

    Thread Starter sabino106

    (@sabino106)

    Chip –

    If you’re reading this — You ROCK!

    I checked-out the plug-in you suggested, and it’s just black & white. It’s a one-page php file, highly-rated, cleanly-coded and it worked perfectly. I have variations in the sidebar rendering on a few different pages on my prototype site right now, and this is going to eventually make this all very easy to manage. Thank you!!

    Mark

    Alwyn Botha

    (@123milliseconds)

    Please mark thread as resolved so that

    – others with similar problem can see it as resolved and will read this thread for help if they have similar problem

    – people providing help see it as resolved and will not waste time reading this post.

    Well, if anyone rocks it is the developer of the Widget Logic Plugin. 😉

    Glad you got everything working!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘First Site: Customizing Sidebars to Specific Pages?’ is closed to new replies.