Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1417665

    jamievilasini
    Participant

    Hi There!

    I’ve read many of the posts on how to move a sidebar above the content in mobile- but somehow its not working for me- i tried creating a new php page in the views folder under integrity and moving the sidebar shortcode above the content but it didnt change anything. Would appreciate the help!

    My Set up:
    Integrity
    Sidebar only on blog pages – content left sidebar right
    Child Theme set up
    Local set up so i cant give my credentials
    Wordpress/Cornerstone – all the latest version

    Thanks!

    #1418023

    Nabeel A
    Moderator

    Hi there,

    Thanks for writing around! To move the sidebar above content in mobile view, create a new file wp-index.php and paste the following code inside:

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/WP-INDEX.PHP
    // -----------------------------------------------------------------------------
    // Index page output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
    
      <div class="x-container max width offset">
      
    	<?php get_sidebar(); ?>
    	
        <div class="<?php x_main_content_class(); ?>" role="main">
    
          <?php x_get_view( 'global', '_index' ); ?>
    
        </div>
    
      </div>
    
    <?php get_footer(); ?>

    Via FTP upload this file to /x-child/framework/views/integrity/ in your Child Theme. Then add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:

    .x-sidebar {
        margin: 0 0 3em 0 !important;
    }

    Let us know how this goes!

    #1418062

    jamievilasini
    Participant

    ok i’ll give it a try now, thanks!

    #1418164

    Nabeel A
    Moderator

    Sure, do let us know if this works for you.

    Cheers!