editing a php so it has a sidebar

Posted on 2013-11-09
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 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

// Template Name: Full Width Page
get_header(); ?>
		<?php if (function_exists('progression_breadcrumbs')) progression_breadcrumbs(); ?>
		<div class="content-container">
			<div class="page-content">
				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; ?>
				<?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 get_footer(); ?>

Open in new window

Question by:jonathanduane2010
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
LVL 58

Expert Comment

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

Author Comment

ID: 39635843
maybe it does i never checked :)

yes its
LVL 58

Expert Comment

ID: 39635848
Is this just on the homepage, since other pages do have a sidebar
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.


Author Comment

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
LVL 58

Expert Comment

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

Author Comment

ID: 39635867
how do i do that?

Author Comment

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

Accepted Solution

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

Featured Post

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The viewer will learn how to count occurrences of each item in an array.

691 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