WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] No Sidebar Top page with Sidebar bottom Possible?

[Resolved] No Sidebar Top page with Sidebar bottom Possible?

  • Hello Friends,

    I am using a child of Twenty Eleven.
    Can anyone tell me if it is possible to create a Page Template that I can have my widgets on the right Sidebar but below the area they are normally found?

    On my Home page (only), I need to have the full (top portion of the page for a slider. Below this area, (approximately: width=850px by height=400px) I will have the normal Content on Left where I can have my widgets, (two actually) on the right and copy on the left.
    URL: http://67.231.17.15/~business/?page_id=284

    As I say, this is to accommodate a full width Slider to be located below the navigation area.
    Additionally, this is only for the Home page. The other pages are to be a straight forward Content on the Left using Sidebar Template.

    I had thought of using the One-column, no sidebar that Twenty Eleven comes with but I need the Sidebar so that kind of ruled that out.

    If you have any suggestions I would love to hear from you.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Check out this section, it might help you out

    Hi Fiction Edge,

    Thank you for this.
    I will definitely take a look at it.

    Thank you again. Very much appreciated!

    You’re welcome, please come back and tell me how it turn out.

    Hey Friction Edge,

    Thank you again by the way for the link yesterday.

    What I have done is put a functions.php into my child folder to register the new widget, (called the widget: Home right sidebar).

    Looking at things now however, I am still a bit cloudy.
    To achieve my goal, I still think I have to do one of two things:

    1) Find a way to either author a new Sidebar Template that I can use for the home page. (link below illustrates the layout).

    OR..

    2) Find a way that if I do use the widget I just created on the Home page, (only), it will need to know how to (after being authored somehow) communicate with the Home page some way, thus locating itself, (the widget that is) in the lower area of the page where I need it.

    Now that I think, would this not bring me back to the same issue which is, how to create a Page Template that will accommodate a full width area 850px width by 400px height. The lower portion of the (Home page only) accommodating a Sidebar Template set up, widgets on the right.

    I put a small image online to show what I have in mind at: http://www3.sympatico.ca/dm11/images/homeP_layout.jpg

    This is only for the Home page as I mentioned. The other pages I am using the Sidebar or Default Template that came with twentyeleven.

    Maybe I am making this too complicated.
    Any thoughts?

    WPyogi
    Forum Moderator

    @wpyogi

    Sounds like you need to make a custom template for the home page and put the slider section above the main part of the page

    http://codex.wordpress.org/Page_Templates

    Hi WPyogi,

    Thank you for the link. I believe a special Template is what I need too.
    Thanks for validating that.

    To save some time I am thinking of cloning the Sidebar template, name it something else and then work on how to make the changes.

    Thanks again.

    WPyogi
    Forum Moderator

    @wpyogi

    cloning the Sidebar template, name it something else and then work on how to make the changes.

    Definitely the way to go…

    Thanks WYyogi,

    I am using the renamed Sidebar Template as a Template choice for Home page.
    Additionally, using the new widget I just created.
    However I still think I am missing something.
    Unless I am wrong, I still need to tell the new widget that its location begins about 450px from Top, as right sidebar.

    I am now wondering if that means I would need to author something into another file, (sidebar.php) perhaps, of Twentyeleven so that the new widget understands that it a specific location. OR, is this (stipulating a specific location for the widget) something I can do in the new functions.php I have in my child folder?

    WPyogi
    Forum Moderator

    @wpyogi

    I don’t think you need to do anything with widgets at all so far as adding the slider section. You should be able to just add a div above where the existing page code begins – what’s the code you have in your new template?

    Michael
    Forum Moderator

    @alchymyth

    to accommodate a full width Slider to be located below the navigation area.
    Additionally, this is only for the Home page.

    adding the slider code into a page template based on the ‘sidebar page’ template, before <div id="primary"> should work.

    a different approach to the other suggestions, without page template, with a conditional section in header.php;
    add the code below this line:
    <div id="main">

    example:

    <?php if( is_front_page() ) : ?>
    <div class="slider"> SLIDER CODE HERE </div>
    <?php endif; ?>

    needs some formatting for the .slider div…

    what slider code/plugin are you planning to use?

    Hi again WPyogi,

    I think you might be on to something.

    My Page template:

    <?php
    /**
     * Template Name: home-Sidebar Template
     * Description: A Page Template that adds a sidebar to pages
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary">
            <div id="slide_b">
    			<div id="content" role="main">
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', 'page' ); ?>
    
    					<?php comments_template( '', true ); ?>
    
    				<?php endwhile; // end of the loop. ?>
    
    				</div><!--#slide_b-->
    			</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Slider CSS:

    .slide_b {
    	border-radius: 4px;
    	border: 2px solid #008DA6;
    	background-image: url("http://67.231.17.15/~business/wp-content/themes/twentyeleven-child/images/vidbgdfi.jpg");
    	width: 850px;
    	height: 320px;
    }

    But as you can see, it looks like part of my code is incomplete.

    URL: http://67.231.17.15/~business/?page_id=284

    Could the Template be looking for a ‘get php?

    Thanks again for your assistance. I certainly appreciate it and am learning quite a bit too!

    Hello alchymyth,

    I am using the Jquery accordion slideshow plugin.
    Also many thanks for your suggestion. I will definitely give it a try.

    Thank you.

    I went with alchymyths’ recommendation and learned even more thank you very kindly alchymyth.

    I am now trying to line up the slider and the content for the page template.
    Alchymyth I think I understand why you asked me which slider plugin I was using as the slider does not appear. The only thing that shows is the short-code.

    Since the short-code has not changed I am wondering if it could be either a sourcing issue, or could it be that additional coding is required in the new page template?

    Firebug also shows that the page content is outside of the id=primary / id=content. This has me wondering if I am still missing something in the page template coding.

    <?php
    /**
     * Template Name: home-Sidebar Template
     * Description: A Page Template that adds a sidebar to pages
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    	<div class="ib_cont"><div class="inxhdr">unenployed and thinking of starting a business?</div>
    	<div class="top"><div class="slide_b">[jquery-accordion gallery="GALLERY4"]</div>
    		<div id="primary">
    
    			<div id="content" role="main">
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', 'page' ); ?>
    
    					<?php comments_template( '', true ); ?>
    
    				<?php endwhile; // end of the loop. ?>
    
    				</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Ideas would be greatly appreciated and more than welcome.

    Hello Friends,

    I think I just answered one of my own questions.

    Unless I am wrong, and please do correct me as I have learned a lot over the last couple of days and really want to be right on this. Especially when things are beginning to make sense regarding customized Page Templates.

    I should be putting the (Home) page contents directly into the new Template AND inside the <div id=”content” role=”main”>.

    That being said, (and I am going to attempt this) would the Slider content not act in the same way. For instance right now (in the new page template) the slider sitting above the <div id=”primary”>.

    Michael
    Forum Moderator

    @alchymyth

    The only thing that shows is the short-code

    to use shortcode outside of post’s or page’s content, i.e. in a template, you will need to use do_shortcode('whatever') http://codex.wordpress.org/Function_Reference/do_shortcode

    your line rewritten:

    <div class="top"><div class="slide_b"><?php do_shortocde('[jquery-accordion gallery="GALLERY4"]'); ?></div>
Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] No Sidebar Top page with Sidebar bottom Possible?’ is closed to new replies.