Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1008931

    eatcakemedia
    Participant

    How do I add a Revolution slider short code into the header of the XTheme? I have tried to achieve this through the customize, header section using a widget but nothing appears? Could you please solve this for me?

    Thanks.

    #1008992

    Joao
    Moderator

    Hi There,

    You can have your Revolution Slider set up above the Masthead (Above the header) by clicking Edit Page and activating the slider above the masthead.

    If that is not your goal,

    please kindly explain what you are trying to achieve.

    Thanks,

    Joao

    #1009011

    eatcakemedia
    Participant

    Hi Joao,

    Thank you for the speedy response. Is there anyway that I could incorporate this idea to all pages at once? As I have over 45 pages?

    Thanks

    #1009091

    Christopher
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup 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.

    Copy wp-header.php from framework/views/STACK and put it in the same path inside child theme, place this code :

    <?php if ( is_page( ) ) :?>
      <?php echo do_shortcode('[rev_slider agency-home]'); // change the shortcode here ?>
     <?php else : ?>
    
      <?php x_get_view( 'global', '_slider-above' ); ?>
    
    <?php endif; ?>

    instead of this line :

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

    For example if you’re using integrity the final code would be :

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/WP-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Header output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php x_get_view( 'global', '_header' ); ?>
    <?php if ( is_page( ) ) :?>
      <?php echo do_shortcode('[rev_slider agency-home]'); // change slider alias here ?>
     <?php else : ?>
    
      <?php x_get_view( 'global', '_slider-above' ); ?>
    
    <?php endif; ?>
      <header class="<?php x_masthead_class(); ?>" role="banner">
        <?php x_get_view( 'global', '_topbar' ); ?>
        <?php x_get_view( 'global', '_navbar' ); ?>
        <?php x_get_view( 'integrity', '_breadcrumbs' ); ?>
      </header>
    
      <?php x_get_view( 'global', '_slider-below' ); ?>
      <?php x_get_view( 'integrity', '_landmark-header' ); ?>

    Hope it helps.

    #1009136

    eatcakemedia
    Participant

    That is great thank you very much!

    Just one more question before I take all your time, you will see on my website home page there are three boxes at the bottom, one states ‘Welcome to ESQ Recruiting’, the other ‘Why Choose ESQ Recruiting’ and ‘In-House Insider Blog’. These boxes appear to be leveled out on google chrome but on explorer and Mozilla Fox the boxes appear uneven, why is this and how do I resolve this issue? Thanks

    Charlie.

    #1009137

    eatcakemedia
    Participant
    #1009181

    Rahul
    Moderator

    Hey there,

    They look just fine on my Firefox browser.

    Would you mind clearing your browser cache or a hard reset and try again?

    Thanks

    #1009235

    eatcakemedia
    Participant

    Sorry I meant the bottom of the boxes.

    Regards
    Charlie

    #1009342

    Rahul
    Moderator

    Hey there,

    Please add the following code into custom Javascript area :

    jQuery(document).ready(function($) {
      var max = 0;
      $(".x-section .x-column").each(function(index, el) {
        if( $(this).height() > max ){
          max = $(this).height();
        }
      });
      $(".x-section .x-column").css('height', max);
    });

    Hope that helps.

    Thanks

    #1010614

    eatcakemedia
    Participant

    What does this mean and how do I resovle the issue?

    Parse error: syntax error, unexpected ‘else’ (T_ELSE) in /home/esquirerecruitin/public_html/wp-content/themes/child-theme-esq/functions.php on line 18

    Thanks

    #1010621

    Rupok
    Member

    Hi there,

    Thanks for updating. Did you add any other code to your Child Theme’s functions.php? Could you share the whole code from the file here so that we can have a look? You can grab the code by login with FTP.

    Cheers!

    #1010628

    eatcakemedia
    Participant

    Hi Rupok,

    Yes I added the

    <?php if ( is_page( ) ) :?>
    <?php echo do_shortcode(‘[rev_slider agency-home]’); // change the shortcode here ?>
    <?php else : ?>

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

    <?php endif; ?>

    with the correct shoortcode into the Child Theme: Theme Functions (functions.php)

    but it came as an error?

    #1010659

    Lely
    Moderator

    Hi There,

    That code is meant to be place in wp-header.php on wp-content/themes/x-child/framework/views/STACK.
    Please double check the instructions here:https://community.theme.co/forums/topic/how-do-i-add-a-revolution-slider-short-code-into-the-header-of-the-xtheme/#post-1009091

    Hope this helps.