Ethos Blog Carousel issue

Hey Support Team,

I got some Questions about the Blog Carousel at the Ethos Stack.

  1. Is it posible to show the slider just at the first /front Page of the Website?

  2. Can I place it between the Logo and the Navigation?

Here a link to the Site:

Thank you for your time and help!

Hi There,

Thanks for writing in!

1.Try adding the following CSS rule into your Theme Options > Global CSS area.

body:not(.home) .x-post-carousel {
    display: none;
}

2.If you want to change the position, first you need to setup a child theme (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57). Then locate wp-header.php file inside (x/framework/legacy/cranium/headers/views/ethos/) and copy it into your child theme (x-child/framework/legacy/cranium/headers/views/ethos/wp-header.php).

Locate the following line of your file which you can move to a desired location.
<?php x_get_view( 'ethos', '_post', 'carousel' ); ?>

Hope that helps.

Hello There,

the fiirst Point worked out perfectly.

For the second issue:

Can you give me the code when I want to Place the Blog Carousel between the logo and the navbar?
I already placed a Child Theme annd made up the folders until the php but now I don’t know how to place it right.

Thank you for your help and time!!!

Hi there,

Please login through FTP and go to wp-content/themes/x-child then create the following directory path inside it framework/legacy/cranium/headers/views/ethos/ the add the file wp-header.php inside the ethos folder and add this code to the file:

<?php

// =============================================================================
// VIEWS/ETHOS/WP-HEADER.PHP
// -----------------------------------------------------------------------------
// Header output for Ethos.
// =============================================================================

?>

<?php x_get_view( 'global', '_header' ); ?>

  <?php x_get_view( 'global', '_slider-above' ); ?>

  <header class="<?php x_masthead_class(); ?>" role="banner">
    <?php x_get_view( 'global', '_topbar' ); ?>
    <?php x_get_view( 'global', '_navbar' ); ?>
    <?php x_get_view( 'ethos', '_breadcrumbs' ); ?>
  </header>

  <?php x_get_view( 'global', '_slider-below' ); ?>
  <?php x_get_view( 'ethos', '_landmark-header' ); ?>

The code above will remove the carousel to its default position which is on top of the header area.

Now to move it between the logo and the navigation. first, make sure that your header layout is set to Stacked in the Theme Options.

The create file directory x-child\framework\legacy\cranium\headers\views\global then create the file _navbar.php inside the global folder then add this code:

<?php

// =============================================================================
// VIEWS/GLOBAL/_NAVBAR.PHP
// -----------------------------------------------------------------------------
// Outputs the navbar.
// =============================================================================

$navbar_position = x_get_navbar_positioning();
$logo_nav_layout = x_get_logo_navigation_layout();
$is_one_page_nav = x_is_one_page_navigation();

?>

<?php if ( ( $navbar_position == 'static-top' || $navbar_position == 'fixed-top' || $is_one_page_nav ) && $logo_nav_layout == 'stacked' ) : ?>

  <div class="x-logobar">
    <div class="x-logobar-inner">
      <div class="x-container max width">
        <?php x_get_view( 'global', '_brand' ); ?>
      </div>
    </div>
  </div>
  <?php x_get_view( 'ethos', '_post', 'carousel' ); ?>
  <div class="x-navbar-wrap">
    <div class="<?php x_navbar_class(); ?>">
      <div class="x-navbar-inner">
        <div class="x-container max width">
          <?php x_get_view( 'global', '_nav', 'primary' ); ?>
        </div>
      </div>
    </div>
  </div>

<?php else : ?>

  <div class="x-navbar-wrap">
    <div class="<?php x_navbar_class(); ?>">
      <div class="x-navbar-inner">
        <div class="x-container max width">
          <?php x_get_view( 'global', '_brand' ); ?>
          <?php x_get_view( 'global', '_nav', 'primary' ); ?>
        </div>
      </div>
    </div>
  </div>

<?php endif; ?>

Hope this helps.

1 Like

HEy @Jade,

YYYEEEAHAAAA!!1! It worked out perfectly! Thank you really much!!!

Have a nice day!!!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.