Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1248901
    MB
    Participant

    Hi,

    Please advise me on procedure to move post carousel to footer on home page only.

    Thanks, MB

    Vancouver Island Hiking Guide

    #1248960
    Nabeel A
    Moderator

    Hi MB,

    Thanks for writing in! Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

    (function($) {
       $('.home .x-post-carousel').insertBefore('.x-colophon.top');
    })(jQuery);

    Let us know how this goes!

    #1249015
    MB
    Participant

    Thanks Nabeel A, that bumps the post carousel down to above the footer widget vs above the nav bar.

    1. We want the post carousel to display inside footer widget. Not above it.

    2. We want the post carousel to display only on the home page. No post carousel on any other pages.

    Thanks for your help so far Nabeel A, looking forward to the solution for 1 & 2. MB

    #1249292
    Darshana
    Moderator

    Hi there,

    Copy the file wp-header.php which is located under (“x/framework/views/ethos/”) into your child theme’s respective location (“x-child/framework/views/ethos/wp-header.php”) and open it using a text editor and locate the following code.

    <?php //x_get_view( 'ethos', '_post', 'carousel' ); ?>

    Then replace that line with the following and replace 35 with your home page id. Here’s how to locate Page/Post IDs (https://community.theme.co/kb/how-to-locate-post-ids/).

    <?php if (!is_page(35)) { x_get_view( 'ethos', '_post', 'carousel' ); } ?>

    Then copy the file wp-footer.php which is located under (“x/framework/views/ethos/”) into your child theme’s respective location (“x-child/framework/views/ethos/wp-footer.php”) and replace that file with the following code. On line number #19, replace the value 35 with your homepage ID. (if(is_page(35)){ x_get_view( 'ethos', '_post', 'carousel' );})

    
    <?php
    
    // =============================================================================
    // VIEWS/ETHOS/WP-FOOTER.PHP
    // -----------------------------------------------------------------------------
    // Footer output for Ethos.
    // =============================================================================
    
    ?>
    
      <?php x_get_view( 'global', '_header', 'widget-areas' ); ?>
      <?php x_get_view( 'global', '_footer', 'scroll-top' ); ?>
      <?php x_get_view( 'global', '_footer', 'widget-areas' ); ?>
    
      <?php if ( x_get_option( 'x_footer_bottom_display' ) == '1' ) : ?>
    
        <footer class="x-colophon bottom" role="contentinfo">
    
          <?php if(is_page(35)){ x_get_view( 'ethos', '_post', 'carousel' );} ?>
    
          <div class="x-container max width">
    
          
    
            <?php if ( x_get_option( 'x_footer_content_display' ) == '1' ) : ?>
              <div class="x-colophon-content">
                <?php echo do_shortcode( x_get_option( 'x_footer_content' ) ); ?>
              </div>
            <?php endif; ?>
    
            <?php if ( x_get_option( 'x_footer_menu_display' ) == '1' ) : ?>
              <?php x_get_view( 'global', '_nav', 'footer' ); ?>
            <?php endif; ?>
    
            <?php if ( x_get_option( 'x_footer_social_display' ) == '1' ) : ?>
              <?php x_social_global(); ?>
            <?php endif; ?>
    
          </div>
        </footer>
    
      <?php endif; ?>
    
    <?php x_get_view( 'global', '_footer' ); ?>
    

    Hope that helps.

    Note: We can only provide you a general guidance. If you need in-depth customization, we advice you to contact a developer or a service.

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