WordPress.org

Forums

[resolved] No Sidebar Top page with Sidebar bottom Possible? (19 posts)

  1. David_1
    Member
    Posted 1 year ago #

    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.

  2. Fiction Edge
    Member
    Posted 1 year ago #

    Check out this section, it might help you out

  3. David_1
    Member
    Posted 1 year ago #

    Hi Fiction Edge,

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

    Thank you again. Very much appreciated!

  4. Fiction Edge
    Member
    Posted 1 year ago #

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

  5. David_1
    Member
    Posted 1 year ago #

    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?

  6. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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

  7. David_1
    Member
    Posted 1 year ago #

    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.

  8. WPyogi
    Forum Moderator
    Posted 1 year ago #

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

    Definitely the way to go...

  9. David_1
    Member
    Posted 1 year ago #

    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?

  10. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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?

  11. Michael
    Forum Moderator
    Posted 1 year ago #

    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?

  12. David_1
    Member
    Posted 1 year ago #

    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!

  13. David_1
    Member
    Posted 1 year ago #

    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.

  14. David_1
    Member
    Posted 1 year ago #

    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.

  15. David_1
    Member
    Posted 1 year ago #

    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">.

  16. Michael
    Forum Moderator
    Posted 1 year ago #

    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>
  17. David_1
    Member
    Posted 1 year ago #

    Thank you again alchymyth.

    I will read that link!
    Also thank you for the re-write.

  18. David_1
    Member
    Posted 1 year ago #

    Hi All,

    I have made some amazing ground with your kind assistance. I think everything looks fine and I have also learned quite a lot so all in all it has been a great experience.
    The only thing outstanding is trying to get the slider to appear.

    I keep getting errors as I follow the instructions at Function Reference/do shortcode at: http://codex.wordpress.org/Function_Reference/do_shortcode. I must be either missing something or perhaps I need to try and find a different Accordion style slider to work with.

    I just would like to say another big thank you to all that lent me assistance as it has made a huge difference and I am extremely appreciative of your help and your time.

    Thank you all.

  19. David_1
    Member
    Posted 1 year ago #

    Finally today I resolved the issue with the shortcode for the Slider in the page template.

    Again many thanks to everyone who helped out. Your help (as always) has made the difference!

    Will mark this one resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic