Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #653428

    pipb8ker
    Participant

    Hi support,

    This is my first website, so again I apologize if I ask a

    I have created a sidebar for a section of my site. I wish for the sidebar to appear at the top of the content when on mobile. But after reading some articles about the positioning of sidebars for mobile, it appears I can’t do this without custom development.

    My page is http://test.lucernepartners.com/about-2/executive-team/.

    Can you please point me in the right direction of how to customise this…is it in javascript, css?

    Thanks in advance??

    πŸ™‚

    #653443

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in!

    What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once your child theme is active and ready, please follow on the following steps to achieve what you have in mind.
    1] Please create a new file in your local machine.

    2] Please insert the following code into the new file you created.

    <?php
    
    // =============================================================================
    // VIEWS/ETHOS/TEMPLATE-LAYOUT-SIDEBAR-CONTENT.PHP
    // -----------------------------------------------------------------------------
    // Sidebar left, content right page output for Ethos.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
    
      <div class="x-container max width main">
        <div class="offset cf">
    
          <?php get_sidebar(); ?>
    
          <div class="<?php x_main_content_class(); ?>" role="main">
    
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'ethos', 'content', 'page' ); ?>
              <?php x_get_view( 'global', '_comments-template' ); ?>
            <?php endwhile; ?>
    
          </div>
    
        </div>
      </div>
    
    <?php get_footer(); ?>

    3] Save this file named as template-layout-sidebar-content.php.

    4] Upload this file in your server in the child theme’s folder
    wp-content/themes/x-child/framework/views/ethos/

    We would loved to know if this has work for you. Thank you.

    #657497

    pipb8ker
    Participant

    It worked!
    Thank you, Thank you, Thank you!

    #657595

    Paul R
    Moderator

    You’re welcome! πŸ™‚