![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I keep messing this up, so I figured I'd ask.
Here's what I'm trying to do: I want to have a page that shows the page content, as the page template normally would. Right after the content, there will be a widget area. While I imagine just about any widget could be used here, I intend to use the Genesis Responsive slider to show and scroll through several subpages' worth of content without having to navigate to them. Ideally, this will be a full width page (no sidebars). I can't seem to get a custom template to work for this. ![]() Help? Pretty please? |
|
#2
|
||||
|
||||
|
Related to your other post - this is the part where you;d use the eleven40 widget tute to add the widget area with a hook. ;)
Or... if you made a new page template, add the widget area right in the template. Can also use a hook here. http://www.studiopress.com/tutorials/hooks http://www.studiopress.com/tutorials/hook-reference http://genesistutorials.com/visual-hook-guide
__________________
***** These forums were CLOSED to new posts on November 19th, 2012. New forums are here: http://www.studiopress.com/forums/ and you will need to SIGN UP AGAIN. If you need assitance with setting up your theme, go to http://my.studiopress.com/ and read the SETUP links or the TUTORIALS link on the side tab. If you need Account Assistance, file a help desk ticket at the same location. |
|
#3
|
|||
|
|||
|
I got it. Well, it works, but I figured I post the code here for someone else's benefit, as well as your vetting for whatever code compliances and compatibilities I may have missed
Here's the template (I called mine page_widgetized.php): Code:
<?php
/*
Template Name: Widgetized Page
*/
/** Optional -Forces the full width layout on the Portfolio page */
/** add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); */
/** Optional -Removes the standard loop */
/** remove_action( 'genesis_loop', 'genesis_do_loop' ); */
/** This adds the widgetized area */
add_action( 'genesis_after_post_content', 'widgetized_page_area_sidebar' );
/** This should put a widget area right after the content*/
function widgetized_page_area_sidebar() {
echo '<div class="widgetized-area-style">';
dynamic_sidebar( 'widgetized-page-area' );
echo '</div>';
}
genesis();
Of course, this need to be registered in functions.php : Code:
/** Register Widgetized Page Area widget */
genesis_register_sidebar( array(
'id' => 'widgetized-page-area',
'name' => 'Widgetized Page Area',
'description' => 'This is the widgetized page area sidebar.',
) );
It's been assigned a class, so that the CSS is (with whatever width value works for user): Code:
/* Widgetized Area style
--------------------------------- */
.widgetized-area-style {
clear: both;
margin: 0 auto;
width: 728px;
}
|
|
#4
|
||||
|
||||
Pretty snazzy - move to the head of the class. ;)
__________________
***** These forums were CLOSED to new posts on November 19th, 2012. New forums are here: http://www.studiopress.com/forums/ and you will need to SIGN UP AGAIN. If you need assitance with setting up your theme, go to http://my.studiopress.com/ and read the SETUP links or the TUTORIALS link on the side tab. If you need Account Assistance, file a help desk ticket at the same location. |
| Thread Tools | |
| Display Modes | |
|
|
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us