Solved

editing a php so it has a sidebar

Posted on 2013-11-09
8
326 Views
Last Modified: 2013-11-09
Hi guys,

I was wondering if i can edit a template i am using so it has a sidebar?  something similar to the sidebar here on another site i look after  www.bodyfirst.ie i have tried copying that template but it throws off everything else here is the code for the template i am using that i would like to put a sidebar on

<?php
// Template Name: Full Width Page
get_header(); ?>
		
		<?php
			
				if(have_posts()) 
					while(have_posts()): 
						the_post();
			?>	
		
		
		<?php if (function_exists('progression_breadcrumbs')) progression_breadcrumbs(); ?>
		
		
		<div class="content-container">
			
			
				
			<div class="page-content">
				
				<?php
				if($post->post_parent) {
					$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&depth=1&echo=0');
				}
				else {
					$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->ID . '&depth=1&echo=0');
				}

				if ($children) { ?>
				
				<ul class="sub-pagination">
					<?php if($post->post_parent): ?>
					<li><a href='<?php echo get_permalink($post->post_parent); ?>'><?php echo get_the_title($post->post_parent); ?></a></li>
					<?php else: ?>
					<li class="current_page_item"><a href='<?php echo get_permalink($post->ID); ?>'><?php echo get_the_title($post->ID); ?></a></li>
					<?php endif; ?>

					<?php echo $children; ?>
				</ul>
				<?php } else { ?>

				<?php } ?>
				

					<h1 class="page-title"><?php the_title(); ?></h1>
					
					
					<?php the_content(); ?>
					
					
					<div class="clearfix"></div>
					
					

				
				
				
				

				
				
				
				
			
			</div><!-- close .page-content -->
			
			
			</div><!-- close .sidebar-container -->
			
			
		</div><!-- close .content-container -->
		<div class="content-container-base">
		</div><!-- close .content-container-base or .content-container-base-pagination -->
		
		
	<?php
				endwhile;
			?>
	
<?php get_footer(); ?>

Open in new window

0
Comment
Question by:jonathanduane2010
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39635837
Does the template not include a 2 col page?
Got a link to the page.
0
 

Author Comment

by:jonathanduane2010
ID: 39635843
maybe it does i never checked :)

yes its http://dancingsoul.greatlocks.ie/
0
 
LVL 58

Expert Comment

by:Gary
ID: 39635848
Is this just on the homepage, since other pages do have a sidebar
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 

Author Comment

by:jonathanduane2010
ID: 39635853
yes they have a right side bar i am looking for a left one if possible.. or i suppose it doesnt make a difference
0
 
LVL 58

Expert Comment

by:Gary
ID: 39635864
Well you've already changed it.
You could just change the floats around.
0
 

Author Comment

by:jonathanduane2010
ID: 39635867
how do i do that?
0
 

Author Comment

by:jonathanduane2010
ID: 39635877
Ok, i found it, can i change the background so it isnt grey its white like the rest of the page?
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39635884
The grey background is an image that you have positioned to the right
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
migrating to phpbb forum from vBulletin 4.2 3 34
Increase counter and attr inside a while loop 15 36
SQL to JSON 14 35
compare date to getdate() 8 16
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question