• Resolved HodRod

    (@hodrod)


    I am trying to add the Sidebar Widget to the content-single.php file. Below is where I have it added right now. It almost works but if I use a header, the content of the post gets pushed below the widget but if I put it anywhere else, all the content shows up below the widget.

    <div class="entry-content">
         <div class="postmeta">
                            	<!-- <div class="post-date"><?php echo get_the_date(); ?></div><!-- post-date -->
                                <!-- <div class="post-comment"><?php comments_number(); ?></div><!-- post-comment --> <div class="clear" style="margin-bottom: 30px;"></div>
                                <?php get_sidebar(); ?>
    						</div><!-- postmeta -->
    		<div class="post-thumb" align="center">

    Is there something I need to put around the get_sidebar(), like a <div> or something to make it fit correctly on the right side of the screen?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author sonalsinha21

    (@sonalsinha21)

    Hi,

    Our blog template already has a sidebar with it. So not sure why you are trying to add a sidebar widget to content-single.php.

    It already has a sidebar and a widget.

    Thread Starter HodRod

    (@hodrod)

    It’s not the Blog Template, it’s when you view a individual Post that there is no sidebar widget.

    Theme Author sonalsinha21

    (@sonalsinha21)

    Hi,

    Strange because we have sidebar. Anyways please check wp-content/themes/skt-full-width/content-single.php

    And add sidebar code.

    In case there is a sidebar and no widget is appearing. Add widgets from Appearance>Widgets>Primary Sidebar

    It should appear.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding Sidebar Widget to content-single.php’ is closed to new replies.