• Resolved apicalmedia

    (@apicalmedia)


    Hi im hoping someone can help me, im very new to wordpress so please forgive me if i come across like an idiot…although i am!

    Im using Twenty Eleven with a child theme.

    I am trying to create a 2nd sidebar template where as this side bar i will manually add static images to it. I copied the sidebar-page.php file and renamed it so i can choose from which side bar i want for various pages, however when i use the standard sidebar template that works fine but when using my new template you can see there are issues with the page content over lapping onto the sidebar.

    Here is a link: https://www.apicalmedia-webdesign.co.uk/blog/new-test/

    The code i used in my new sidebar template is:

    <?php
    /**
     * Template Name: Sidebar Template333
     * 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="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 -->
    
    	<div id="secondary" class="widget-area" role="complementary">
    
        <p>My Static Boxes</p>
    
        <img src="/images/box1.png" width="240" height="160" />
    	</br></br>
        <img src="/images/box2.png" width="240" height="160" />
        </br></br>
        <img src="/images/box3.png" width="240" height="160" />
    
    	</div><!-- #secondary .widget-area -->
    
    <?php get_footer(); ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use a pastebin. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

    Thank you for any help you can provide me.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New Sidebar Template’ is closed to new replies.