child theme functions.php nightmare
-
Hi,
has anyone managed to change the slider so that it is just image slider, without links and text.
I have followed instructions from a thread here, but it’s not working. I’m going crazy. No matter how I write functions.php it does not work. Please, if anyone has the patience to help me. I want to change that and get on with modifying my website.
Regards
-
Hi,
the slider is managed by the file library / structure / header-extensions.php
from line 359HI,
yes i found it and have been copied into a new functions.php file. Then change the two lines that are described in the thread “Clean Retina – [resolved] Slider”. But online, it will not change. I make “Empty cash”, but it will be the same. I know that you must specify in functions.php “remove_function” and “add_funktion” but I do not know how.
Any suggestions?
Regardshi,
why functions.php ?
there are lines to this file, but the rest must be for header-extensions.phphi,
it is so described in the legend
“Then go to structure-> header extenstion.php and copyrights this function
cleanretina_featured_post_slider. Create functions.php in your child theme and paste the above function. Then just replace this line …” Therefore I created new functions.php and done that which is written in the thread. Is it wrong done?
Regardshi,
where do you see this legend?
That?if ( ! function_exists( 'cleanretina_featured_post_slider' ) ) : /** * display featured post slider * * @uses set_transient and delete_transient */or there ?
http://ww.wp.xz.cn/support/topic/slider-13?replies=10
if yes then everything is good, I was wrong, sorry
you do not give the address of your site.hi,
adress to my website is http://www.rbflyfishing.com.
I do not understand what you mean?
It is on the beginning of the function, but would I not change it to make it function to the child theme?<?php /****************************************************************************************/ if ( ! function_exists( 'cleanretina_featured_post_slider' ) ) : /** * display featured post slider * * @uses set_transient and delete_transient */ function cleanretina_featured_post_slider() { global $post; global $cleanretina_theme_options_settings; $options = $cleanretina_theme_options_settings; $cleanretina_featured_post_slider = ''; if( ( !$cleanretina_featured_post_slider = get_transient( 'cleanretina_featured_post_slider' ) ) && !empty( $options[ 'featured_post_slider' ] ) ) { $cleanretina_featured_post_slider .= ' <section class="featured-slider"><div class="slider-wrap"><div class="slider-cycle">'; $get_featured_posts = new WP_Query( array( 'posts_per_page' => $options[ 'slider_quantity' ], 'post_type' => array( 'post', 'page' ), 'post__in' => $options[ 'featured_post_slider' ], 'orderby' => 'post__in', 'ignore_sticky_posts' => 1 // ignore sticky posts )); $i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++; $title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) ); $excerpt = get_the_excerpt(); if ( 1 == $i ) { $classes = "slides displayblock"; } else { $classes = "slides displaynone"; } $cleanretina_featured_post_slider .= ' <div class="'.$classes.'">'; if( has_post_thumbnail() ) { $cleanretina_featured_post_slider .= '<figure><a title="'.the_title('','',false).'">';</a> $cleanretina_featured_post_slider .= get_the_post_thumbnail( $post->ID, 'slider', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class' => 'pngfix' ) ).'</figure>'; } if( $title_attribute != '' || $excerpt !='' ) { $cleanretina_featured_post_slider .= ' <article class="featured-text">'; if( $title_attribute !='' ) { $cleanretina_featured_post_slider .= the_title( '<span>','</span>', false ).$excerpt; } $cleanretina_featured_post_slider .= ' </article><!-- .featured-text -->'; } $cleanretina_featured_post_slider .= ' </div><!-- .slides -->'; endwhile; wp_reset_query(); $cleanretina_featured_post_slider .= '</div></div> <nav id="controllers" class="clearfix"> </nav><!-- #controllers --></section><!-- .featured-slider -->'; set_transient( 'cleanretina_featured_post_slider', $cleanretina_featured_post_slider, 86940 ); } echo $cleanretina_featured_post_slider; } endif; /****************************************************************************************/ <?[Moderator note: Please wrap all code in backticks]
sorry but the theme is more complicated than I thought it, I hang on the hooks, I can not help you.
no problem, thanks anyway.
Regardshi,
style.css
.featured-text { display: none; padding: none; }hi,
thanks for the help!
a step forward. π
It now remains only link to remove.
After I searched the web for solutions, I got the idee to change the header extenstion.php original theme. Not in the child theme functions. I’ll try later.
The topic ‘child theme functions.php nightmare’ is closed to new replies.
