Viewing 7 replies - 1 through 7 (of 7 total)
  • Are you using different templates for the two different posts? If you scroll down to the end of the content on both posts, on the first one, there’s just a What Next? section, with no Related Posts section, and the links don’t look anything like the links in the second post.

    Thread Starter Rachit Singh

    (@rachit-singh)

    Thanks for replying, I really wanted help badly, I actually want to use a single sidebar, but my theme has two sidebars, one for posts and one for home page.
    Can you tell me, how to fix the problem ? I don’t know much of CSS

    I don’t think it’s a CSS problem. Which theme are you using? Can you try disabling the sharing plugin that generates the What Next? and Related Posts section at the end of each article?

    Thread Starter Rachit Singh

    (@rachit-singh)

    How to remove, it is in theme template…
    here it is
    <?php
    // Start the engine
    require_once(TEMPLATEPATH.’/lib/init.php’);

    // Add new image sizes
    genesis_add_image_size(‘Dynamic Content Gallery’, 610, 225, TRUE);

    // Force layout on homepage
    add_filter(‘genesis_options’, ‘corporate_home_layout’, 10, 2);
    function corporate_home_layout($options, $setting) {
    if($setting == GENESIS_SETTINGS_FIELD) {
    if(is_home())
    $options[‘site_layout’] = ‘content-sidebar’;
    }
    return $options;
    }

    // Replaces homepage sidebar with Sidebar Home in widget area
    add_action(‘genesis_after_content’, ‘get_custom_sidebar’, 5);
    function get_custom_sidebar() {
    if( is_home() ) {
    remove_action(‘genesis_after_content’, ‘genesis_get_sidebar’);
    get_sidebar(‘home’);
    }
    }

    // Register widget areas
    genesis_register_sidebar(array(
    ‘name’=>’Sidebar Home’,
    ‘description’ => ‘This is the right sidebar on the homepage.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Featured Top Left’,
    ‘description’ => ‘This is the featured top left column of the homepage.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Featured Top Right’,
    ‘description’ => ‘This is the featured top right column of the homepage.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Featured Bottom’,
    ‘description’ => ‘This is the featured bottom section of the homepage.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    ?><?php
    // Start the engine
    require_once(TEMPLATEPATH.’/lib/init.php’);

    // Add new image sizes
    genesis_add_image_size(‘Sidebar #1’, 270, 150, TRUE);
    genesis_add_image_size(‘Sidebar #2’, 90, 90, TRUE);

    // Add widgeted footer section
    add_action(‘genesis_before_footer’, ‘platinum_include_footer_widgets’);
    function platinum_include_footer_widgets() {
    require(CHILD_DIR.’/footer-widgeted.php’);
    }

    // Force layout on homepage
    add_filter(‘genesis_options’, ‘platinum_home_layout’, 10, 2);
    function platinum_home_layout($options, $setting) {
    if($setting == GENESIS_SETTINGS_FIELD) {
    if(is_home())
    $options[‘site_layout’] = ‘content-sidebar’;
    }
    return $options;
    }

    // Register sidebars
    genesis_register_sidebar(array(
    ‘name’=>’Homepage’,
    ‘description’ => ‘This is the featured column of the homepage.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Footer #1’,
    ‘description’ => ‘This is the first column of the footer section.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Footer #2’,
    ‘description’ => ‘This is the second column of the footer section.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Footer #3’,
    ‘description’ => ‘This is the third column of the footer section.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    genesis_register_sidebar(array(
    ‘name’=>’Footer #4’,
    ‘description’ => ‘This is the fourth column of the footer section.’,
    ‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
    ));
    // Create shortcode for Post Info sharing icons
    function post_share_shortcode() {
    if (!is_page()) {
    $permalink = get_permalink();
    $datatext = get_the_title();
    $share_buttons = ‘
    <div class=”twitter-share-button”>
    <a href=”https://twitter.com/share&#8221; class=”twitter-share-button”
    data-url=”‘.$permalink.'” data-text=”‘.$datatext.'”>Tweet
    </div>
    ‘;
    return $share_buttons;
    }}
    add_shortcode(‘post_share’, ‘post_share_shortcode’);
    /** Display related posts in Genesis based on Category */
    function related_posts_categories() {
    if ( is_single ( ) ) {
    global $post;
    $count = 0;
    $postIDs = array( $post->ID );
    $related = ”;
    $cats = wp_get_post_categories( $post->ID );
    $catIDs = array( );{
    foreach ( $cats as $cat ) {
    $catIDs[] = $cat;
    }
    $args = array(
    ‘category__in’ => $catIDs,
    ‘post__not_in’ => $postIDs,
    ‘showposts’ => 5,
    ‘ignore_sticky_posts’ => 1,
    ‘orderby’ => ‘rand’,
    ‘tax_query’ => array(
    array(
    ‘taxonomy’ => ‘post_format’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(
    ‘post-format-link’,
    ‘post-format-status’,
    ‘post-format-aside’,
    ‘post-format-quote’ ),
    ‘operator’ => ‘NOT IN’
    )
    )
    );
    $cat_query = new WP_Query( $args );
    if ( $cat_query->have_posts() ) {
    while ( $cat_query->have_posts() ) {
    $cat_query->the_post();
    $related .= ‘

    • ‘ . get_the_title() . ‘
    • ‘;
      }
      }
      }
      if ( $related ) {
      printf( ‘<div id=”content” class=”after-post”><div class=”related”><b>Related Posts</b>

      %s

    </div>’, $related );
    }
    wp_reset_query();
    }
    }
    add_action( ‘genesis_before_comments’, ‘related_posts_categories’, 9);
    /** Add Social Media Icons on Single Posts **/
    add_action( ‘genesis_before_comments’, ‘child_social_media_icons’, 9);
    function child_social_media_icons() {
    if ( is_single() ) { ?>
    </div>
    <?php } }
    /** Add Genesis Box on Single Posts **/
    add_action(‘genesis_before_comments’, ‘include_genesis_box’, 10);
    function include_genesis_box() {
    if ( is_single() )
    require(CHILD_DIR.’/genesis-box.php’);
    }
    ?>

    If you’re using the Genesis theme, you’ll have to post your question on the Studio Press support forum. It’s part of what you paid for, plus, it’s impossible for us to support commercial themes on these forums because we can’t download and install the themes ourselves.

    Thread Starter Rachit Singh

    (@rachit-singh)

    I removed the what next and related, still same issue

    This page looks fine to me, now. Maybe you need to clear your browser cache (press Ctrl-F5).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sidebar is not at place, comments come in sidebar’ is closed to new replies.