Tagged: child theme, featured slider, navigation
- This topic has 3 replies, 2 voices, and was last updated 7 years, 3 months ago by tikaram.
-
AuthorPosts
-
September 12, 2017 at 3:50 am #122012KarlParticipant
I have tried to eliminate the controls from the featured slider. This Additional CSS seems to have eliminated the controls (prev and next) but the indicator “dots” still appear to control the displayed image:
.cycle-prev #prev, .cycle-next #next {
display: none;
}I would like to “hide” those dots that indicate which of my 4 images are being displayed.
Also, I am pulling out my hair trying to figure out how to put a stop to the pause-on-hover behavior. I would like it to continuously rotate through the images without pausing. I tried adding
featured-slider.php to my child theme top directory but it seems to ignore it when I change the line
data-cycle-pause-on-hover=”true” (to read) data-cycle-pause-on-hover=”false”. Even after saving the file and loading the page in a different browser it makes no change.I love this theme, but, what am I doing wrong? Did I make a terrible mistake when I renamed the theme from rock-start-pro-child (which I D/L from Catch Themes) to rock-star-pro-child ??? And is that why my child theme seems to be getting ignored?
My test site is:
http://karlstest.comIs it not a good practice to use Additional CSS and a child theme? If I was pressed for time I would hire a customizer.
September 12, 2017 at 5:23 am #122017tikaramParticipant@karl : To remove the dots add the following additional css.
.header-image-slider .cycle-pager{ display: none; }
Add the following code to the functions.php file of the child theme.
function rock_star_featured_slider() { global $post, $wp_query; // get data value from options $options = rock_star_get_theme_options(); $enable_slider = $options['featured_slider_option']; $sliderselect = $options['featured_slider_type']; $enable_slidersocial = $options['featured_slider_enable_social_icons']; $imageloader = $options['featured_slider_image_loader']; // Get Page ID outside Loop $page_id = $wp_query->get_queried_object_id(); // Front page displays in Reading Settings $page_on_front = get_option('page_on_front') ; $page_for_posts = get_option('page_for_posts'); if ( 'entire-site' == $enable_slider || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && 'homepage' == $enable_slider ) ) { if ( ( !$output = get_transient( 'rock_star_featured_slider' ) ) ) { echo '<!-- refreshing cache -->'; if ( $enable_slidersocial ) { $sliderclass = "main-slider with-social sections"; } else { $sliderclass = "main-slider sections"; } $output = ' <div class="' . $sliderclass . '"> <div class="wrapper"> <div class="cycle-slideshow" data-cycle-log="false" data-cycle-pause-on-hover="false" data-cycle-swipe="true" data-cycle-auto-height=container data-cycle-fx="'. esc_attr( $options['featured_slide_transition_effect'] ) .'" data-cycle-speed="'. esc_attr( $options['featured_slide_transition_length'] ) * 1000 .'" data-cycle-timeout="'. esc_attr( $options['featured_slide_transition_delay'] ) * 1000 .'" data-cycle-loader="'. esc_attr( $imageloader ) .'" data-cycle-slides="> article" data-cycle-next="#next" data-cycle-prev="#prev" data-cycle-pager="#pager1" >'; // Select Slider if ( 'demo-featured-slider' == $sliderselect && function_exists( 'rock_star_demo_slider' ) ) { $output .= rock_star_demo_slider( $options ); } elseif ( 'featured-post-slider' == $sliderselect && function_exists( 'rock_star_post_slider' ) ) { $output .= rock_star_post_slider( $options ); } elseif ( 'featured-page-slider' == $sliderselect && function_exists( 'rock_star_page_slider' ) ) { $output .= rock_star_page_slider( $options ); } elseif ( 'featured-category-slider' == $sliderselect && function_exists( 'rock_star_category_slider' ) ) { $output .= rock_star_category_slider( $options ); } elseif ( 'featured-image-slider' == $sliderselect && function_exists( 'rock_star_image_slider' ) ) { $output .= rock_star_image_slider( $options ); } $output .= ' </div><!-- .cycle-slideshow --> <div class="controls"> <div class="cycle-prev"><a href="#" id="prev"><span class="screen-reader-text">' . esc_html__( 'Previous Slide', 'rock-star-pro' ) . '</span></a></div><!-- .cycle-prev --> <div class="cycle-next"><a href="#" id="next"><span class="screen-reader-text">' . esc_html__( 'Next Slide', 'rock-star-pro' ) . '</span></a></div><!-- .cycle-next --> </div><!-- .controls --> <div id="pager1" class="cycle-pager"></div><!-- .cycle-pager -->'; if ( $enable_slidersocial ) { $output .= rock_star_get_social_icons(); } $output .= ' </div><!-- .wrapper --> </div><!-- #feature-slider -->'; set_transient( 'rock_star_featured_slider', $output, 86940 ); } echo $output; } }
To see your changes instantly you will need to clear the transient. To clear Transient : Go to customizer preview and make any change you like. After the transient is cleared the slider will not stop on Hover.
Let me know if you need further assistance.Regards,
TikaramSeptember 12, 2017 at 4:12 pm #122048KarlParticipantThank you Tikaram!
When I tried to copy/paste from the email into a text editor, I ended up with extra linefeeds in the code. When I came back to this topic and did copy/paste into a text editor, it worked perfectly. I was able to copy/paste it into my child functions.php without any issues! Your impressive support was provided fast and thorough!
I am elated over my purchase from Catch Themes! I will continue to recommend Catch Themes to anyone looking for a WordPress Theme that is solid, responsive, fast, and comes with world class support!
Karl
September 13, 2017 at 5:48 am #122092tikaramParticipantHello Karl,
I hope I was able to resolve your issue. Would you mind taking a few minutes to write a review for me please?
https://wordpress.org/support/theme/rock-star/reviews/#new-post
I’d really love to know what you think of my support. Your feedback is deeply valued as it will help potential clients read about your experience and also help me improve.
Thank you so much for your help!Regards,
Tikaram -
AuthorPosts
- The topic ‘Trouble removing controls, indicators and disable 'pause on hover'’ is closed to new replies.