How to put "latest news" (for example) below menu (fixed to the side)

Hi everbody,
I’m thinking about putting the menu to the side (like in integrity-demo 4).
Is it possible to put content like “latest news” (or widgets) in the free space below the menu?

Thanks for any tipps
Regards
Ralf

Hey Ralf,

This is possible but you will have to override the default theme code through the child theme.

Please install and activate the child theme. If you do not have the child theme installed yet, you can download it from here. Once you have it installed and activated, please login through FTP then go to wp-content/themes/x-child then go to the path framework/legacy/cranium/headers/views/global. In case you are not seeing the folders present, kindly create the folders until you get the directory path then create the file _navbar.php inside the global directory.

Edit the file and add this code to the file:

<?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>

  <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' ); ?>

          <!-- Add the custom code here.  -->

        </div>
      </div>
    </div>
  </div>

<?php endif; ?>

Notice in line 44 you have <!-- Add the custom code here. -->. Add the additional code in that area.

If you want to add the recent posts there, you can add <?php do_shortcode('[recent_posts count="2" orientation="vertical"]');?>

Please refer to this link for the available shortcodes in X:

http://demo.theme.co/integrity-1/shortcodes/recent-posts/

Hope this helps.

1 Like

Wow - thanks a lot!
Maybe creating a child theme is a little over the top for me right now, but I’ll think about it…:thumbsup:

You’re welcome.

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