Page with Sidebar on Right Side
-
I have been attempting to use a child theme to modify Spun.
I am trying to create a Page Template that will show the sidebar on the right side (about 70% primary content, 30% sidebar content). I would like this sidebar to only show up when this specific Page Template is being used.
I have created a Page Template that looks like this:
<?php /** * Template Name: Store * *A modified file for a Store from Spun's Page Template * * @package Spun * @since Spun 1.0 */ get_header(); ?> <div id="primary" class="content-area"> <div id="content" class="site-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 .site-content --> </div><!-- #primary .content-area --> <?php get_sidebar(); ?> <?php get_footer(); ?>
And used CSS (found here) to try to accomplish this goal:
.page #primary { float: left; width: 70%; } #secondary { clear: right; display: block; padding: 50px 0; float: right; width: 30%; } .sidebar-link { display: none; } .page .hentry { padding: 0px; width: 100%; } .widget-column { width: 100%; } .one.widget-column { float: none; margin: 0 0 0 40px; }
So far, I have succeeded in turning all Pages into 70% width, with no visible sidebar and no other successes.
The page is here: https://nekothreesixty.com/wolf-bee-alchemy/
I would also settle for making a new sidebar and widgetizing it, as suggested here but I have not had good luck getting that to work either. Anyone figured this one out?
If it is helpful to note: I have also modified the content-home to display Pages instead of posts, created a custom Page Template that calls all posts in the category Blog, changed fonts & colors.
- The topic ‘Page with Sidebar on Right Side’ is closed to new replies.