• How can i add a sidebar to a fullwidth page ? , you can find the code below. Really need help.

    <?php
    /**
     * Template Name: Full Width, no sidebar(s)
    */
    
    get_header(); ?>
    
        <div id="main-fullwidth">
    
            <?php
                if (have_posts()) : while (have_posts()) : the_post();
                    /**
                     * Find the post formatting for the pages in the post-page.php file
                     */
                    get_template_part('post', 'page');
    
                    if(comments_open( get_the_ID() ))  {
                        comments_template('', true);
                    }
                endwhile;
    
                else :
                    get_template_part('post', 'noresults');
                endif;
            ?>
    
        </div><!-- #main-fullwidth -->
    
    <?php get_footer(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Try this:

    <?php
    /**
     * Template Name: Full Width, no sidebar(s)
    */
    
    get_header(); ?>
    
        <div id="main-fullwidth">
    
            <?php
                if (have_posts()) : while (have_posts()) : the_post();
                    /**
                     * Find the post formatting for the pages in the post-page.php file
                     */
                    get_template_part('post', 'page');
    
                    if(comments_open( get_the_ID() ))  {
                        comments_template('', true);
                    }
                endwhile;
    
                else :
                    get_template_part('post', 'noresults');
                endif;
            ?>
    
        </div><!-- #main-fullwidth -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thread Starter AlexSandager

    (@alexsandager)

    I get the sidebar, but it goes under the context. Can I in somehow move the context to the right, so the sidebar comes up on the left side of the context?

    Can you show me a online demo?

    Thread Starter AlexSandager

    (@alexsandager)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I add a sidebar to a Fullwidth page ?’ is closed to new replies.