Tagged: x
-
AuthorPosts
-
November 6, 2016 at 8:36 am #1245899
dippelpParticipantHello,
i really love the X Theme but i need a little Help.
I use a X-Child Theme with “Renew”.
My Problem: I alway use a Revolution Slider above my Menu. But the option for Sliders “above or under Masterhead” only works for pages and not for posts. In my blog streampage all looks fine, but if i click on a post and switch to the single post page i have no slider of course.
So how could i add a Slider for my single posts pages? The same slider for all post pages would be good; a function for individual sliders like in page settings would be even better.
In the forum i only found solutions for the blog stream page and not for the single blog pages. :/
Please help me!
Thanks in advance 🙂
Regards,
PD
November 6, 2016 at 9:17 am #1245929
ThaiModeratorHi PD,
To enable the slider above / below for the posts, please add the following code under functions.php file locates in your child theme:
add_action( 'add_meta_boxes', 'x_child_post_meta_boxes' ); function x_child_post_meta_boxes(){ if ( X_REVOLUTION_SLIDER_IS_ACTIVE || X_LAYERSLIDER_IS_ACTIVE ) : $meta_box = array( 'id' => 'x-meta-box-slider-above', 'title' => __( 'Slider Settings: Above Masthead', '__x__' ), 'description' => __( 'Select your options to display a slider above the masthead.', '__x__' ), 'page' => 'post', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __( 'Slider', '__x__' ), 'desc' => __( 'To activate your slider, select an option from the dropdown. To deactivate your slider, set the dropdown back to "Deactivated."', '__x__' ), 'id' => '_x_slider_above', 'type' => 'sliders', 'std' => 'Deactivated' ), array( 'name' => __( 'Optional Background Video', '__x__' ), 'desc' => __( 'Include your video URL(s) here. If using multiple sources, separate them using the pipe character (|) and place fallbacks towards the end (i.e. .webm then .mp4 then .ogv).', '__x__' ), 'id' => '_x_slider_above_bg_video', 'type' => 'text', 'std' => '' ), array( 'name' => __( 'Video Poster Image (For Mobile)', '__x__' ), 'desc' => __( 'Click the button to upload your video poster image to show on mobile devices, or enter it in manually using the text field above. Only select one image for this field. To clear, delete the image URL from the text field and save your page.', '__x__' ), 'id' => '_x_slider_above_bg_video_poster', 'type' => 'uploader', 'std' => '' ), array( 'name' => __( 'Enable Scroll Bottom Anchor', '__x__' ), 'desc' => __( 'Select to enable the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_above_scroll_bottom_anchor_enable', 'type' => 'checkbox', 'std' => '' ), array( 'name' => __( 'Scroll Bottom Anchor Alignment', '__x__' ), 'desc' => __( 'Select the alignment of the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_above_scroll_bottom_anchor_alignment', 'type' => 'select', 'std' => 'top left', 'options' => array( 'top left', 'top center', 'top right', 'bottom left', 'bottom center', 'bottom right' ) ), array( 'name' => __( 'Scroll Bottom Anchor Color', '__x__' ), 'desc' => __( 'Select the color of the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_above_scroll_bottom_anchor_color', 'type' => 'color', 'std' => '#ffffff' ), array( 'name' => __( 'Scroll Bottom Anchor Color Hover', '__x__' ), 'desc' => __( 'Select the hover color of the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_above_scroll_bottom_anchor_color_hover', 'type' => 'color', 'std' => '#ffffff' ) ) ); x_add_meta_box( $meta_box ); $meta_box = array( 'id' => 'x-meta-box-slider-below', 'title' => __( 'Slider Settings: Below Masthead', '__x__' ), 'description' => __( 'Select your options to display a slider below the masthead.', '__x__' ), 'page' => 'post', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __( 'Slider', '__x__' ), 'desc' => __( 'To activate your slider, select an option from the dropdown. To deactivate your slider, set the dropdown back to "Deactivated."', '__x__' ), 'id' => '_x_slider_below', 'type' => 'sliders', 'std' => 'Deactivated' ), array( 'name' => __( 'Optional Background Video', '__x__' ), 'desc' => __( 'Include your video URL(s) here. If using multiple sources, separate them using the pipe character (|) and place fallbacks towards the end (i.e. .webm then .mp4 then .ogv).', '__x__' ), 'id' => '_x_slider_below_bg_video', 'type' => 'text', 'std' => '' ), array( 'name' => __( 'Video Poster Image (For Mobile)', '__x__' ), 'desc' => __( 'Click the button to upload your video poster image to show on mobile devices, or enter it in manually using the text field above. Only select one image for this field. To clear, delete the image URL from the text field and save your page.', '__x__' ), 'id' => '_x_slider_below_bg_video_poster', 'type' => 'uploader', 'std' => '' ), array( 'name' => __( 'Enable Scroll Bottom Anchor', '__x__' ), 'desc' => __( 'Select to enable the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_below_scroll_bottom_anchor_enable', 'type' => 'checkbox', 'std' => '' ), array( 'name' => __( 'Scroll Bottom Anchor Alignment', '__x__' ), 'desc' => __( 'Select the alignment of the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_below_scroll_bottom_anchor_alignment', 'type' => 'select', 'std' => 'top left', 'options' => array( 'top left', 'top center', 'top right', 'bottom left', 'bottom center', 'bottom right' ) ), array( 'name' => __( 'Scroll Bottom Anchor Color', '__x__' ), 'desc' => __( 'Select the color of the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_below_scroll_bottom_anchor_color', 'type' => 'color', 'std' => '#ffffff' ), array( 'name' => __( 'Scroll Bottom Anchor Color Hover', '__x__' ), 'desc' => __( 'Select the hover color of the scroll bottom anchor for your slider.', '__x__' ), 'id' => '_x_slider_below_scroll_bottom_anchor_color_hover', 'type' => 'color', 'std' => '#ffffff' ) ) ); x_add_meta_box( $meta_box ); endif; }Regards!
November 6, 2016 at 11:49 am #1246060
dippelpParticipantThanks, that works perfectly! 🙂
Thank you very much for the fast reply!
Best regards,
PD
November 6, 2016 at 11:57 am #1246068
ThaiModeratorGlad it worked 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1245899 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
