Putting a slider at the top of blog page

I have my blog set as my home page. I would like to have my revolution slider show at the top instead of the demo post slider. http://janitorialjumpstart.com Either add my blog posts to a page that has the slider or put the slider and logo (basically the upper section) on top of my blog posts.
Here’s the top I want: http://janitorialjumpstart.com/blog-2/

The best way to do this is with a child theme edit. You can read about it here: https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

The file in question is located at VIEWS/ETHOS/_POST-SLIDER.PHP in the parent theme. You will need to duplicate that, with the same folder structure, into your child theme and edit the php file to remove the default code and insert your slider code instead.

Alternatively, you can edit VIEWS/ETHOS/WP-INDEX.PHP instead, and remove line 17 and replace it with your slider code.

Thank you. I will give this a try

Hello There,

Thanks for writing in! I would highly recommend the alternative suggestions of @Michael.

Assuming that you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/ETHOS/WP-INDEX.PHP
// -----------------------------------------------------------------------------
// Index page output for Ethos.
// =============================================================================

$is_filterable_index = is_home() && x_get_option( 'x_ethos_filterable_index_enable' ) == '1';

?>

<?php get_header(); ?>

  <div class="x-container max width main">

    <?php //x_get_view( 'ethos', '_post', 'slider' ); ?>
    <?php echo do_shortcode('[rev_slider alias="home-slider"]'); ?>

    <div class="offset cf">
      <div class="<?php x_main_content_class(); ?>" role="main">

        <?php if ( $is_filterable_index ) : ?>
          <?php x_get_view( 'ethos', '_index' ); ?>
        <?php else : ?>
          <?php x_get_view( 'global', '_index' ); ?>
        <?php endif; ?>

      </div>

      <?php get_sidebar(); ?>

    </div>
  </div>

<?php get_footer(); ?>

Please do not forget to change the alias name home-slider to the correct name of your slider.

3] Save the file named as wp-index.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/ethos

You will need to create the folder names because this folder path does not exist in your child theme yet.

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

1 Like

I am using “renew” and attempted creating the file in wp-content/themes/x-child/framework/views/renew. And it did not work. The short code for the Revolution Code is [rev_slider alias=“church-home”]

Did I miss something?

See code copied and placed in the file “wp-index.php”…

 <?php

// =============================================================================
// VIEWS/RENEW/WP-INDEX.PHP
// -----------------------------------------------------------------------------
// Index page output for RENEW.
// =============================================================================

$is_filterable_index = is_home() && x_get_option( 'x_renew_filterable_index_enable' ) == '1';

?>

<?php get_header(); ?>

<div class="x-container max width main">

<?php //x_get_view( 'renew', '_post', 'church-home' ); ?>
<?php echo do_shortcode('[rev_slider alias="church-home"]'); ?>

<div class="offset cf">
  <div class="<?php x_main_content_class(); ?>" role="main">

    <?php if ( $is_filterable_index ) : ?>
      <?php x_get_view( 'renew', '_index' ); ?>
    <?php else : ?>
      <?php x_get_view( 'global', '_index' ); ?>
    <?php endif; ?>

  </div>

  <?php get_sidebar(); ?>

</div>
</div>

<?php get_footer(); ?>

Hi there,

Please kindly make sure that you have an updated version of the theme which is the version 5,2,3. Then copy the file below with the same directory hierarchy to your Child Theme:

wp-content/themes/x/framework/views/renew/wp-index.php

So it will be:

wp-content/themes/x-child/framework/views/renew/wp-index.php

The content should be:

<?php

// =============================================================================
// VIEWS/RENEW/WP-INDEX.PHP
// -----------------------------------------------------------------------------
// Index page output for Renew.
// =============================================================================

?>

<?php get_header(); ?>

  <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">

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

    </div>

    <?php get_sidebar(); ?>

  </div>

<?php get_footer(); ?>

Now you can add the shortcode to the file. If you want to restrict the code for posts you can use this function:

https://developer.wordpress.org/reference/functions/is_single/

If you need additional assistance, kindly open up a new thread and give us the detailed information of your case with the login information to follow up.

Thank you

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