Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1278844
    sandra.i
    Participant

    Hi

    Would it be possible to place the post image in the sidebar of the single post page, above ‘recent posts’ widget?

    If you look at my post page here, I would like the image to be above the ‘Latest News’ widget on the right.

    http://www.rochesterclinic.co.uk/how-does-a-high-protein-diet-aid-weight-loss-study-sheds-light/

    I’m happy to modify any php files.

    Thanks

    #1279084
    Jade
    Moderator

    Hi there,

    Please make a copy of wp-sidebar.php from /wp-content/themes/x/framework/views/renew/wp-sidebar.php then add it in /wp-content/themes/x-child/framework/views/renew/wp-sidebar.php. Replace the code in the file to:

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/WP-SIDEBAR.PHP
    // -----------------------------------------------------------------------------
    // Sidebar output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_content_layout() != 'full-width' ) : ?>
    
      <aside class="<?php x_sidebar_class(); ?>" role="complementary">
          <?php if ( has_post_thumbnail() ) : ?>
          <div class="entry-featured">
            <?php x_featured_image(); ?>
          </div>
        <?php endif; ?>   
        <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?>
          <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'sidebar-main' ) ); ?>
        <?php else : ?>
          <?php dynamic_sidebar( 'sidebar-main' ); ?>
        <?php endif; ?>
      </aside>
    
    <?php endif; ?>

    Then add this CSS:

    
    .x-main .entry-featured {
        display: none;
    }

    Hope this helps.

    #1279714
    sandra.i
    Participant

    Perfect, thanks!

    #1279720
    Thai
    Moderator

    You’re most welcome 🙂

  • <script> jQuery(function($){ $("#no-reply-1278844 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>