Solved

editing a php so it has a sidebar

Posted on 2013-11-09
8
304 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
  • 4
  • 4
8 Comments
 
LVL 58

Expert Comment

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

Author Comment

by:jonathanduane2010
Comment Utility
maybe it does i never checked :)

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

Expert Comment

by:Gary
Comment Utility
Is this just on the homepage, since other pages do have a sidebar
0
 

Author Comment

by:jonathanduane2010
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 58

Expert Comment

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

Author Comment

by:jonathanduane2010
Comment Utility
how do i do that?
0
 

Author Comment

by:jonathanduane2010
Comment Utility
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
Comment Utility
The grey background is an image that you have positioned to the right
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article discusses four methods for overlaying images in a container on a web page
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now