Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Correct way to create sidebars?


  #1  
Old Feb 2, 2013, 07:02 AM
Michael4fm's Avatar
Michael4fm
 
38 posts · Nov 2011
Manchester, UK
Correct way to create sidebars?

The 'automatic' sidebar creation in Montezuma is great, but is there a 'right' way to do it consistantly? I'm using a lot of physical templates and they don't seem to automatically create the sidebars they need.

I'm currently getting around the challenge by 'creating' them in one of the virtual comments subtemplates, which I'm not actually using. Works fine, but if there's a 'proper' way, I should probably be doing that!

[If there isn't, could I suggest that my 'hack' would seem to be easy to incorporate as a 'proper' feature at a later date?]
  #2  
Old Feb 2, 2013, 08:13 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
What do you mean by "automatic sidebar creation"?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Feb 2, 2013, 08:30 AM
Michael4fm's Avatar
Michael4fm
 
38 posts · Nov 2011
Manchester, UK
When you use <?php dynamic_sidebar( '...name...' ); ?> in a virtual template, it automatically creates a widget area called "...name..." that you can view through Appearance | Widgets and add widgets to.
  #4  
Old Feb 2, 2013, 09:07 AM
jerryc
 
367 posts · Oct 2012
Florida
Quote:
Originally Posted by Michael4fm
When you use <?php dynamic_sidebar( '...name...' ); ?> in a virtual template, it automatically creates a widget area called "...name..." that you can view through Appearance | Widgets and add widgets to.
That sounds like the right way to me. I don't use and wouldn't recommend physical templates, but ymmv.

Last edited by jerryc; Feb 2, 2013 at 09:12 AM.
  #5  
Old Feb 2, 2013, 09:18 AM
Michael4fm's Avatar
Michael4fm
 
38 posts · Nov 2011
Manchester, UK
Yeah, but if you use <?php dynamic_sidebar( '...name...' ); ?> in a physical template, they don't get created - so at the moment I'm creating them by adding a 'phantom' entry in one of the comments.php sub-template which I don't use. I'm sure that wouldn't be the 'right' way to do it, so was wondering if there is a 'proper' way I should ... or given that it seems so easy to do, suggesting as a feature that another entry in one of the sub-templates (possibly "comments" as it already works there and the template is already "bits of") be added to allow for sidebar creation.
  #6  
Old Feb 2, 2013, 09:29 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I am really confused as to what you are trying to do. For instance you talk about creating a phantom entry in a comment.php sub template. Why are you not just adding the code for the new widget area to index.php for instance?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Feb 2, 2013, 09:40 AM
jerryc
 
367 posts · Oct 2012
Florida
Quote:
Originally Posted by Michael4fm
... suggesting as a feature that another entry in one of the sub-templates ... be added to allow for sidebar creation.
It might be a nice feature. Until it's added, I think you have found the only workable way, without more extreme code hacking.

With the approach your'e taking, you could have an unused virtual template with unlimited sidebars, any of which could then be used in any other template(s).

Bear in mind, if you're using physical templates, if you use existing names, such as index.php, your edits will get clobbered with a theme upgrade. This doesn't happen with virtual templates.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create space between TD#Middle and Sidebars? Masselyn Atahualpa 3 Wordpress theme 3 Dec 1, 2009 02:36 AM


All times are GMT -6. The time now is 05:13 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.