Tagged: x
-
AuthorPosts
-
April 10, 2016 at 9:09 am #875207
rjjderksParticipantHi 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.April 10, 2016 at 9:32 pm #875787
Rue NelModeratorHello 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-144635Hope this helps.
April 10, 2016 at 9:37 pm #875794
LelyModeratorHi 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.
April 11, 2016 at 5:46 am #876237
rjjderksParticipantThis reply has been marked as private.April 11, 2016 at 5:47 am #876240
rjjderksParticipantThis reply has been marked as private.April 11, 2016 at 10:05 am #876564
RupokMemberHi 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!
April 11, 2016 at 10:57 am #876653
rjjderksParticipantHi 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é
April 11, 2016 at 5:53 pm #877306
JadeModeratorHi 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 credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
April 12, 2016 at 12:36 am #877677
rjjderksParticipantHi Jade, that’s unfortunately not possible….My site is on my pc; Localhost
April 12, 2016 at 8:19 am #878256
JackKeymasterHi 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!
April 13, 2016 at 6:47 am #879839
rjjderksParticipantThis reply has been marked as private.April 13, 2016 at 12:13 pm #880423
RupokMemberHi 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!
April 14, 2016 at 6:48 am #882026
rjjderksParticipantHi 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éApril 14, 2016 at 1:10 pm #882794
JadeModeratorGlad to hear that René and you’re always welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-875207 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
