WordPress.org

Ready to get started?Download WordPress

Forums

[Theme: Oenology] page templates, layouts, and widgets (33 posts)

  1. BreezyOhio
    Member
    Posted 2 years ago #

    Chip

    I'm getting my head around how page templates, layouts, and widgets interact.

    Right now when I choose the "front page" template I get std widgets in columns. If I then go to appearance|Widgets it doesn't show widgets in the sidebar left, right, bottom, etc.

    If I choose the "default template" I get no widgets in sidebars even if I add a widget to a displayed sidebar.

    I've gone thru the documentation (lots of great stuff on customizing, functions, etc) but I cannot find out what's going here. If this is WP thing just let me know and I'll look elsewhere.

    Can I add page styles via the child theme methods?

  2. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    I'm getting my head around how page templates, layouts, and widgets interact.

    Right now when I choose the "front page" template I get std widgets in columns.

    What do you mean, "choose the front page template"? You really shouldn't be selecting that template. WordPress uses it automatically to output the static Page specified to display the site front page.

    If I then go to appearance|Widgets it doesn't show widgets in the sidebar left, right, bottom, etc.

    I think that should be as expected. There are no Widgets defined until you add them. The sidebars display default output if no Widgets are assigned, but that default output is over-written by user-assigned Widgets.

    If I choose the "default template" I get no widgets in sidebars even if I add a widget to a displayed sidebar.

    That behavior indicates that you have set the "default template" for static Pages to one-column, which has no Widgetized sidebars. Go to Dashboard -> Appearance -> Oenology Settings -> Layout tab, and verify what is set for Default Static Page Layout.

    Note: you can change per-page layout settings using the corresponding meta box on the Edit Page screen.

    I've gone thru the documentation (lots of great stuff on customizing, functions, etc) but I cannot find out what's going here.

    Admittedly, most of the documentation is written for developers, but Dashboard -> Appearance -> Oenology Reference -> General tab should have what you need. If not, I'll update it. (I just checked; looks like I left out the Layout functionality entirely!)

    If this is WP thing just let me know and I'll look elsewhere.

    Can I add page styles via the child theme methods?

    What kinds of page styles do you want to add? Child Themes are well-suited to making such modifications, but what you're trying to accomplish will dictate the best approach.

  3. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

  4. BreezyOhio
    Member
    Posted 2 years ago #

    If I go to quick edit for a page I can choose from two templates .. front page and default template .. I chose front page because I am building a website, not just a blog. In fact it will, if all goes to plan, have about 10 static pages and one blog page.

    On my static pages I want to use a two column layout (left sidebar and main entry on right) along with a header and footer of course. I went into appearance|oenology|layout and set every option to two columns.

    I went to widgets and created a text box in the left sidebar. It DOES show up but only in the front page template, along with many other widgets. In the default template it is not there. It would seem from a neophyte's point of view that there should be widget placement options for each page template but there doesn't appear to be.

    I guess because of the consequent confusion/interplay between layout options, page templates, and widget placement I would like to make some pages that always work the same way, thus maybe making a series of page templates that have widgets in place, like the front page template seems to do. Really I don't need to do this IF I can figure out how all these consistently interact.

    Sorry if I'm making this confusing ..

  5. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    If I go to quick edit for a page I can choose from two templates .. front page and default template .. I chose front page because I am building a website, not just a blog. In fact it will, if all goes to plan, have about 10 static pages and one blog page.

    The problem is that you're selecting your Site Front Page in the wrong place. :)

    Go to Dashboard -> Settings -> Reading, and change Front page displays from "Your latest posts" to "A static page".

    Then, immediately beneath that option, use the dropdowns to select the static Pages to use for your site front page and blog posts index.

    Once you've done that, WordPress will automatically apply the Front Page template to the page you've set as the front page.

    On my static pages I want to use a two column layout (left sidebar and main entry on right) along with a header and footer of course. I went into appearance|oenology|layout and set every option to two columns.

    Perfect so far...

    I went to widgets and created a text box in the left sidebar. It DOES show up but only in the front page template, along with many other widgets. In the default template it is not there.

    Try setting the front page correctly, as above, and see if the problem persists.

    It would seem from a neophyte's point of view that there should be widget placement options for each page template but there doesn't appear to be.

    Such functionality requires the use of a Plugin. I love Widget Logic for just this purpose, but there are other Plugins that might be more new-user friendly.

    I guess because of the consequent confusion/interplay between layout options, page templates, and widget placement I would like to make some pages that always work the same way, thus maybe making a series of page templates that have widgets in place, like the front page template seems to do. Really I don't need to do this IF I can figure out how all these consistently interact.

    Sorry if I'm making this confusing ..

    No problem at all! I think the main problem is the one detailed above. Let's fix that, and then see what issues you still have.

  6. BreezyOhio
    Member
    Posted 2 years ago #

    Yes, things have changed quite a bit with the setting changes you put me onto. Thanks! I'm not sure if it's going to get me there but it's all much better now. Maybe they shouldn't offer that template drop down in the quick edit section .. and frankly that section should be something like "page edit" instead of quick edit.

  7. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Maybe they shouldn't offer that template drop down in the quick edit section...

    To be fair: that dropdown does serve a purpose, if custom page templates are provided. The problem is that front-page.php should probably be hidden from this view. That is an issue with the Theme, and I've just added it as a bug report, and committed the fix.

    ...and frankly that section should be something like "page edit" instead of quick edit.

    The "Page Edit" will take you to the full Page Edit screen. "Quick Edit" just gives a small set of options to change in-line in the list of Pages.

  8. BreezyOhio
    Member
    Posted 2 years ago #

    Page edit though doesn't offer edits for page name, etc. It's only content editing. I cannot tell you how many times I clicked on page|edit trying to change the name of the page. Finally I just tried quick edit and there it was.

    BTW, thanks for all your help. I'm donating .. can you give me a link?

  9. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Page edit though doesn't offer edits for page name, etc. It's only content editing. I cannot tell you how many times I clicked on page|edit trying to change the name of the page.

    It's actually there, but it might be hidden. Click the "Screen Options" tab, and ensure the appropriate fields are enabled/checked.

    Finally I just tried quick edit and there it was.

    Quick Edit is actually incredibly useful! Most things that need to be changed are right there. It's a pretty good time-saver.

    BTW, thanks for all your help. I'm donating .. can you give me a link?

    It's really not necessary, but I appreciate it. Take a look in readme.txt.

  10. BreezyOhio
    Member
    Posted 2 years ago #

    I guess we're not quite done here ..
    in oenology|Layout I have 2 column set for everything. The first option throws me a bit .. Default static page Layout .. it says two columns (menu on left, content on right)

    I'm actually getting content on left, sidebar on right, though in testing I can see it's the left sidebar. What's the difference between menu and sidebar in this context?

    There isn't an option for 2 column (sidebar on left,content on right), which is the layout I'm looking for. Is there a way to get that? The single post Layout has this as an option but not the static page layout.

  11. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    I guess we're not quite done here ..
    in oenology|Layout I have 2 column set for everything. The first option throws me a bit .. Default static page Layout .. it says two columns (menu on left, content on right)

    I'm actually getting content on left, sidebar on right, though in testing I can see it's the left sidebar.

    I can't recrate that. Here's that layout on my development site.

    What's the difference between menu and sidebar in this context?

    The menu takes the place of the left-side Widgetized sidebar on static Pages. So, the one- and two-column layouts won't display Widgets. If you need to display Widgets on Pages, use the three-column layout, that has the right-hand sidebar.

    There isn't an option for 2 column (sidebar on left,content on right), which is the layout I'm looking for. Is there a way to get that? The single post Layout has this as an option but not the static page layout.

    Currently, the menu replaces the Widgetized sidebar on the left. I can look into an elegant way to support a menu and/or a Widgetized sidebar on the left for static Pages. But, when I was first implementing the layout options, this approach was the simplest. Now that it's soaked for a while, I can look at expanding the options a bit.

  12. BreezyOhio
    Member
    Posted 2 years ago #

    I understand how options change every time WP is updated, etc. Now that a menu can be a widget would there be a need for a menu only sidebar space?

    In this layout as per your example can you place widgets under the menu? If so i can just create a menu for something and then put widgets below that.

  13. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    There isn't an option for 2 column (sidebar on left,content on right), which is the layout I'm looking for. Is there a way to get that? The single post Layout has this as an option but not the static page layout.

    FYI, here's the issue to track this feature request.

  14. BreezyOhio
    Member
    Posted 2 years ago #

    How do I control whether a page is static page layout or a single post layout? The single post layout does have the left sidebar and right side content option.

  15. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    I understand how options change every time WP is updated, etc. Now that a menu can be a widget would there be a need for a menu only sidebar space?

    By default, the menu is quite powerful, as it is a dynamic menu that displays the hierarchical Pages beneath the current, top-level Page. (See here, for example.)

    That menu can be over-ridden, by applying a custom menu to the appropriate Theme location, but I definitely don't want to remove the default menu, because it is more flexible/powerful in that context than a custom menu.

    In this layout as per your example can you place widgets under the menu? If so i can just create a menu for something and then put widgets below that.

    That's what I had originally. I need to think about the best implementation. I will probably add a Theme option to display/not display that menu, and then add beneath the menu a Widgetized sidebar with no default content.

  16. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    How do I control whether a page is static page layout or a single post layout? The single post layout does have the left sidebar and right side content option.

    The static Page layout applies to static Pages, and the single blog post layouts apply to single blog Posts. Static Pages and Blog Posts are two completely separate post-types, and cannot be mixed. So, you'll have to decide whether some given content will be a static Page or a blog Post.

    Here's a good Codex reference for understanding the differences:
    http://codex.wordpress.org/Pages

  17. BreezyOhio
    Member
    Posted 2 years ago #

    hey Chip

    I found this link on your site about creating page templates. Is it still valid info, being that it's a year old, pre 3.2?
    http://www.chipbennett.net/2010/11/01/oenology-how-to-create-a-child-theme-and-a-custom-page-template/

    Could I create a page template that would give me the static page, 2 column layout with sidebar on the left and content on the right?

  18. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Could I create a page template that would give me the static page, 2 column layout with sidebar on the left and content on the right?

    You can certainly create custom page templates in your Child Theme, but I would recommend against using that approach to add layouts. The Theme dynamically determines content width and other things, based on the pre-defined layouts.

  19. BreezyOhio
    Member
    Posted 2 years ago #

    Yes I was concerned about that, given that oenology has it's own layout area.

  20. BreezyOhio
    Member
    Posted 2 years ago #

    Arrgh! This problem is driving me crazy. I added a new page with exactly the same layout as my home page and I cannot get the widgets to show up there even though the page type is the same (static page) the column layout is the same (2 column with sidebar on right) with same layout in Oenology layout options too, and no posting on either page.

    Any idea what I'm doing wrong? here's the website temp link if that helps ..
    http://74.86.235.128/~jwhit/

    As a clue if I adjust the about us page to 3 column all kinds of widgets show up that are not in the widgets settings. Confusing to me.

  21. BreezyOhio
    Member
    Posted 2 years ago #

    Sorry I forgot to tell you which pages .. home page and about us ..

  22. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    I added a new page with exactly the same layout as my home page and I cannot get the widgets to show up there even though the page type is the same (static page) the column layout is the same (2 column with sidebar on right)...

    I'm slightly confused. Oenology doesn't have a static Page "2 column with sidebar on right" layout. These are the static Page layout options:

    1-Column One column (full-width content)
    2-Column Two columns (menu on left, content on right)
    3-Column Three columns (menu on left, sidebar on right, content in the center)

    So, which one are you using?

    The Front Page template uses the blog posts 2-column layout, with content on the left, and full-width column on the right.

  23. BreezyOhio
    Member
    Posted 2 years ago #

    I was referring to the Oenology Options|Layout setting in the theme options, though the settings for the pages are the same setting too. Does Oenology vary the layout depending on whether the page is the home page or not? I set the contact us to the "front page" layut but it didn't change anything.

    Would an image make a difference? I don't remember the page layout changing when I added an image to the home page.

  24. BreezyOhio
    Member
    Posted 2 years ago #

    My widgets are in "sidebar column top"

  25. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Does Oenology vary the layout depending on whether the page is the home page or not?

    Yes; currently, the Front Page layout is not configurable (though that's not a bad idea for a future option...)

    My widgets are in "sidebar column top"

    And it does appear that they display on the Front Page. All good so far?

    I added a new page with exactly the same layout as my home page and I cannot get the widgets to show up there even though the page type is the same (static page)

    Looking at the "About Us" page, I can tell that you're using the Two columns (menu on left, content on right layout, which does not have a Widgetized sidebar.

    Currently, if you want to display Widgets on a static Page, you need to be using the Three columns (menu on left, sidebar on right, content in the center) layout.

    Note that this layout has half-width sidebars: Sidebar Left and Sidebar Right. The Sidebar Column Top and Sidebar Column Bottom sidebars are full-width sidebars that only appear on pages that use the blog post-style layouts, i.e. single blog posts, blog post index pages, and the front page.

  26. BreezyOhio
    Member
    Posted 2 years ago #

    "The Sidebar Column Top and Sidebar Column Bottom sidebars are full-width sidebars that only appear on pages that use the blog post-style layouts, i.e. single blog posts, blog post index pages, and the front page. "

    What can I do to make the system see my contact us page (and others yet to be added) single blog posts then to get the same layout as my home page?

  27. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    What can I do to make the system see my contact us page (and others yet to be added) single blog posts then to get the same layout as my home page?

    Currently, you can't.

    Do you think I should add those two blog-page, two-column layouts to Pages? I can certainly do that.

  28. BreezyOhio
    Member
    Posted 2 years ago #

    Keep in mind that I'm no WordPress expert so this might not make sense to others but since you asked ..

    I would have ..
    2 column, sidebar left
    2 column, sidebar right
    3 column with halfbars
    3 column with halfbar left and full sidebar right

    The whole idea that pages have to be laid out based on a site wide or theme wide specification doesn't make sense to me. Why not just allow the designer to lay out each page as they see fit and really define widgets (apparently there are half and full width widgets too) by the page, rather than by page type. They could name the layout and use it as needed.

    But that's just how I see it. I understand WP started as a blog system, but like it or not it's morphed (at least partly) into a website builder package, so that's how these conflicts are created. Maybe in the future WP will handle widgets by the page instead of by page type. Maybe that would require too much to change.

  29. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Keep in mind that I'm no WordPress expert so this might not make sense to others but since you asked ..

    I would have ..
    2 column, sidebar left
    2 column, sidebar right
    3 column with halfbars
    3 column with halfbar left and full sidebar right

    The first two, I think I can implement for Pages pretty easily. The third one already exists. The fourth one (3 column with halfbar left and full sidebar right) I could also do, but it would involve a new (and even narrower, width for the content area.

    To give you an idea of why it's more difficult: if you'll notice, the content area has the same width in the blog-page, two-column layout as in the static-page, three-column layout. In the blog-page layout, the "full-width" sidebar is exactly the width of two "half-width"sidebars - and those two "half-width" sidebars are the same width as the sidebars in the static-page, three-column layout.

    As a corollary: the content-width is the same for the static-page, one-column layout, the static-page two-column layout, and the blog-post one-column layout. In all three, the content-width is basically the full width, minus a "half-width" sidebar. The only difference is that, with the static-page two-column layout, the "half-width" sidebar is on the left and the content area is on the right, while in the one-column layouts, the same-width content area is simply centered.

    But, I'll play around with it, and see how it will look to have an even-narrower content area, to accommodate your suggested layout.

  30. BreezyOhio
    Member
    Posted 2 years ago #

    Oh no, the only reason I suggested that last layout is because some users might someday want to create a wider website than is the standard today. Then again ideally you would also be changing the width of the headers and footers so just scarp this idea. and forget the last option.

    More than you changing your theme, which I hate to make you do, it's more about how you use themes in WP to predetermine a "standard" page layout which defines pages by site. WP, IMO, will someday have to make layouts page editable instead of site editable.

Topic Closed

This topic has been closed to new replies.

About this Topic