Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #875207
    rjjderks
    Participant

    Hi there, first of all; x-them rules big time! I never have worked with such a user friendly theme. But I have a problem. I want my slider (revolution slider) just below the masthead in my blogpage.
    It works on all te pages, but not on my blogpage. The page with the blog overview works fine, but on the stand alone page (the blogpost) it’s not visible. I’ve read all the solutions on this forum and it just won’t work. Can you guys please help me? My site is on my pc; Localhost and I’m working with integrity. Thanks in advance for you’re time.

    #875787
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! The slider settings below and above the masthead is only available for pages. It is not available for single blog posts. Perhaps you can try an alternative solution mention in this topic:
    https://community.theme.co/forums/topic/add-slider-to-article-post/#post-144635

    Hope this helps.

    #875794
    Lely
    Moderator

    Hi There,

    Thanks for posting in.

    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.
    Then add the following on your child theme’s functions.php file.

    function add_slider_on_single_post(){
    
    if ( is_singular('post') ) : 
      echo do_shortcode('revslider shortcode here'); 
     endif; 
    }
    add_action( 'x_after_view_integrity__breadcrumbs', 'add_slider_on_single_post' );

    Note to replace this revslider shortcode here with your revslider code.

    Hope this helps.

    #876237
    rjjderks
    Participant
    This reply has been marked as private.
    #876240
    rjjderks
    Participant
    This reply has been marked as private.
    #876564
    Rupok
    Member

    Hi there,

    Thanks for updating. I can’t see the suggested code on your file so can’t if you added this correctly. You can try updating your code to following :

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // —————————————————————————–
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    // =============================================================================
    // TABLE OF CONTENTS
    // —————————————————————————–
    // 01. Enqueue Parent Stylesheet
    // 02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );
    
    // Additional Functions
    // =============================================================================
    
    if ( ! function_exists( ‘x_facebook_sdk’ ) ) :
    function x_facebook_sdk() {
    
    require( X_FACEBOOK_COMMENTS_PATH . ‘/functions/options.php’ ); ?>
    
    <div id=”fb-root”></div>
    
    <script>
    window.fbAsyncInit = function() {
    FB.init({
    appId : ‘<?php echo $x_facebook_comments_app_id; ?>’,
    xfbml : true,
    version : ‘v2.1’
    });
    };
    
    (function(d, s, id){
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement(s); js.id = id;
    js.src = “//connect.facebook.net/nl_NL/all.js#xfbml=1&appId=919502888084838”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));
    </script>
    
    <?php }
    endif;
    
    add_filter( ‘gettext’, ‘replace_search_string’, 20, 3 );
    function replace_search_string( $search_text, $text, $domain ) {
    if ( $text == ‘Type and Press “enter” to Search’ ) return __( ‘Typ hier in wat je zoekt en druk dan op enter’, $domain );
    else return $search_text;
    }
    
    function add_slider_on_single_post(){
    
    if ( is_singular('post') ) : 
      echo do_shortcode('revslider shortcode here'); 
     endif; 
    }
    add_action( 'x_after_view_integrity__breadcrumbs', 'add_slider_on_single_post' );

    Don’t forget to replace this revslider shortcode here with your revslider code.

    Hope this makes sense.

    Cheers!

    #876653
    rjjderks
    Participant

    Hi there,

    to bad….the slider is not visible.
    This is the updated code:

    <?php

    // =============================================================================
    // FUNCTIONS.PHP
    // —————————————————————————–
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================

    // =============================================================================
    // TABLE OF CONTENTS
    // —————————————————————————–
    // 01. Enqueue Parent Stylesheet
    // 02. Additional Functions
    // =============================================================================

    // Enqueue Parent Stylesheet
    // =============================================================================

    add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );

    // Additional Functions
    // =============================================================================

    if ( ! function_exists( ‘x_facebook_sdk’ ) ) :
    function x_facebook_sdk() {

    require( X_FACEBOOK_COMMENTS_PATH . ‘/functions/options.php’ ); ?>

    <div id=”fb-root”></div>

    <script>
    window.fbAsyncInit = function() {
    FB.init({
    appId : ‘<?php echo $x_facebook_comments_app_id; ?>’,
    xfbml : true,
    version : ‘v2.1’
    });
    };

    (function(d, s, id){
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement(s); js.id = id;
    js.src = “//connect.facebook.net/nl_NL/all.js#xfbml=1&appId=919502888084838”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));
    </script>

    <?php }
    endif;

    add_filter( ‘gettext’, ‘replace_search_string’, 20, 3 );
    function replace_search_string( $search_text, $text, $domain ) {
    if ( $text == ‘Type and Press “enter” to Search’ ) return __( ‘Typ hier in wat je zoekt en druk dan op enter’, $domain );
    else return $search_text;
    }

    function add_slider_on_single_post(){

    if ( is_singular(‘post’) ) :
    echo do_shortcode(‘[rev_slider alias=”header_basis”]’);
    endif;
    }
    add_action( ‘x_after_view_integrity__breadcrumbs’, ‘add_slider_on_single_post’ );

    I don’t have breadcrumbs activated, because that’s not what I want. Does that matter?
    I hope you can help me.
    Thanks in advance.

    Greets René

    #877306
    Jade
    Moderator

    Hi René,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #877677
    rjjderks
    Participant

    Hi Jade, that’s unfortunately not possible….My site is on my pc; Localhost

    #878256
    Jack
    Keymaster

    Hi there René,

    Thanks for writing back, you could provide access to your localhost using a service such as https://forwardhq.com/ if that would work for you?

    Thanks!

    #879839
    rjjderks
    Participant
    This reply has been marked as private.
    #880423
    Rupok
    Member

    Hi René,

    In that case you need to move the site to a staging server if you want our assistance.

    Since the code looks correct and should work, we can’t really help much without checking your site.

    Cheers!

    #882026
    rjjderks
    Participant

    Hi there Rupok,

    i’ve just updated the new version of X-theme, Cornerstone and WordPress and everything works fine now!
    Thanks for you’re support. You guys rock!

    Greetings from the Netherlands
    René

    #882794
    Jade
    Moderator

    Glad to hear that René and you’re always welcome. 🙂

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