- This topic has 14 replies, 2 voices, and was last updated 7 years, 8 months ago by Pratik.
-
AuthorPosts
-
October 13, 2016 at 3:56 am #101363RolandParticipant
Hi
I’ve just updated Catch Kathmandu Pro to v4.8 using the Catch Updater tool. Will I need to edit my Child Theme settings as both 4.6.1 and 4.8 now appear in my list of themes and I need to be sure that the child theme is pointing to the later version of the Pro main theme?
Thanks
Roland
October 13, 2016 at 7:24 am #101383PratikParticipantHi @rolandallen,
It depends on the customization you have made on the child theme. If they are minor, there should be no effect. Most of the time, child themes are not affected so I am guessing it will happen in your case too. Just update the parent theme and child theme will use that.Let me know if the changes you made in child theme disrupts when updating the parent theme and I can help you further.
Regards,
PratikOctober 13, 2016 at 1:01 pm #101391RolandParticipantHi Pratik,
The child theme style.css contains the URI location of the parent theme so this would presumably need to be edited to point to the URI of the updated parent theme. Having tried this and then deleted the old version theme I just see a white screen when attempting to view the site (I’ve now restored the old theme directory and everything is working again).
The old (v4.7.1) theme appears in the Themes directory as “catch-kathmandu-pro-3”
The updated (v4.8) theme appears in the Themes directory as “catch-kathmandu-pro”Any thoughts as to what the problem might be?
Thanks
Roland
October 14, 2016 at 7:06 am #101440PratikParticipantHi Roland,
This is strange. Usually the directory of a theme remains same even if it is different version. You need to do following for me:
1. Share your server’swp-content/theme
folder structure. Screenshot will be fine
2. Point our the parent theme
3. Share your child theme’s functions.php file
4. Share your child theme’s styles.css header Just this part:
Just this part:/* Theme Name: Twenty Fifteen Child Theme URI: http://example.com/twenty-fifteen-child/ Description: Twenty Fifteen Child Theme Author: John Doe Author URI: http://example.com Template: twentyfifteen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twenty-fifteen-child */
Let me know how these are.
October 16, 2016 at 10:00 pm #101568RolandParticipantHi Pratik,
Here is the theme folder structure:https://dl.dropboxusercontent.com/u/8699166/Theme%20folder%20structure.png
The version 4.7.1 theme is “catch-kathmandu-pro-3” (existing parent theme)
the version 4.8 theme is “catch-kathmandu-pro”Child theme functions.php:
<?php /** * Child Theme functions and definitions * */ add_action( 'wp_enqueue_scripts', 'catchkathmandu_child_enqueue_styles' ); function catchkathmandu_child_enqueue_styles() { wp_enqueue_style( 'catchkathmandu-parent-style', get_template_directory_uri() . '/style.css' ); } function catchkathmandu_post_sliders() { //delete_transient( 'catchkathmandu_post_sliders' ); global $post; global $catchkathmandu_options_settings; $options = $catchkathmandu_options_settings; if( ( !$catchkathmandu_post_sliders = get_transient( 'catchkathmandu_post_sliders' ) ) && !empty( $options[ 'featured_slider' ] ) ) { echo '<!-- refreshing cache -->'; $catchkathmandu_post_sliders = ' <div id="main-slider" class="container"> <section class="featured-slider">'; $get_featured_posts = new WP_Query( array( 'posts_per_page' => $options[ 'slider_qty' ], 'post__in' => $options[ 'featured_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 ( $i == 1 ) { $classes = 'post postid-'.$post->ID.' hentry slides displayblock'; } else { $classes = 'post postid-'.$post->ID.' hentry slides displaynone'; } $catchkathmandu_post_sliders .= ' <article class="'.$classes.'"> <figure class="slider-image"> '. get_the_post_thumbnail( $post->ID, 'slider', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class' => 'pngfix' ) ).' </figure> <div class="entry-container"> <header class="entry-header"> <h1 class="entry-title">' . get_the_title() . '</h1> <div class="assistive-text">'.catchkathmandu_page_post_meta().'</div> </header>'; if( $excerpt !='') { $catchkathmandu_post_sliders .= '<div class="entry-content">'. $excerpt.'</div>'; } $catchkathmandu_post_sliders .= ' </div> </article><!-- .slides -->'; endwhile; wp_reset_query(); $catchkathmandu_post_sliders .= ' </section> <div id="slider-nav"> <a class="slide-previous"><</a> <a class="slide-next">></a> </div> <div id="controllers"></div> </div><!-- #main-slider -->'; set_transient( 'catchkathmandu_post_sliders', $catchkathmandu_post_sliders, 86940 ); } echo $catchkathmandu_post_sliders; } // catchkathmandu_post_sliders /** * Loading Parent theme stylesheet * */
Child theme styles.css header: https://dl.dropboxusercontent.com/u/8699166/Child%20theme%20styles.css%20header.png
Thanks
Roland
October 17, 2016 at 9:42 am #101598PratikParticipantThanks for the thorough response. By the looks of it, what you need to do is change the
Template: catch-kahtmandu-pro-3
toTemplate: catch-kathmandu-pro
in child theme’s styles.css file. This will make the child theme \take newcatch-kathmandu-pro
as parent theme, then you can remove old parent theme.Let me know how it goes.
October 17, 2016 at 10:17 pm #101655RolandParticipantHi Pratik,
I tried that – see above (October 13, 2016 at 1:01 pm)
Roland
October 18, 2016 at 9:53 am #101701PratikParticipantHi Roland,
This should have worked if you edited your styles.css. I cannot see any reason why this would work unless there is some issue in folder structure.March 3, 2017 at 2:22 pm #111193RolandParticipantHi Pratik,
I’m having this problem again in that I’ve uploaded 4.9.1 (to replace 4.9) and edited the styles.css file in the Child Theme to point to the new directory. If however I then remove the 4.9 theme I just get the WSOD. So even though I have edited the child theme to point to the new version directory it isn’t picking this up for some reason.
Any suggestions?
Thanks
March 3, 2017 at 2:25 pm #111194PratikParticipantHi @Roland,
You do not need to change child theme’s files after updating parent theme. You will need to seek professional help if you are not able to handle customization.
Regards,
PratikMarch 3, 2017 at 2:30 pm #111195RolandParticipantHi Pratik,
I am quite able to handle customisation thanks and having just spent $50 renewing my support for another year I’m not overwhelmed by your response. Clearly there is an issue here in that having updated your theme using your Catch Updater tools I am unconvinced that my site is now picking up the new theme version.
Roland
March 3, 2017 at 2:38 pm #111196PratikParticipantHi @Roland,
Once you have child theme working, you do not need to do anything. Just updating the parent theme is enough. If you want to be sure if your theme is picking p new version or not, check your site’s source. There should be catch-kathmandu-pro/styles.css file (you can try ctrl+f). See the version there.
I checked your site and it is taking 4.9, there must be something wrong with the folder structure in your theme. You have multiple instances of Catch Kathmandu Pro. Remove others and try only one.
Your current file loaded is catch-kathmandu-pro-2
March 3, 2017 at 2:46 pm #111197RolandParticipantHi Pratik,
Which web site are you looking at? The one in question is brocuspavilion.org.uk (I use this theme on a lot of sites) and the multiple instances of Catch Kathmandu Pro directories have been created by uploading new version of the theme using Catch Updater i.e. your prescribed update method. I haven’t named or changed the names of any of these directories myself?
Thanks
Roland
March 3, 2017 at 2:52 pm #111198PratikParticipantHi Roland,
I am looking at the same site. I got it from one of your previous forum topics.
Using catch web tools should overwrite the old theme files. Main one being catch-kathmandu-pro. Catch updater just replaces the main folder, does not create instances.
Regards,
PratikMarch 3, 2017 at 2:54 pm #111199PratikParticipantHi Roland,
I need to check your admin. I will email you soon. Please provide me the credentials there.
Regards,
Pratik -
AuthorPosts
- The topic ‘Updated to v4.8 – will I need to alter Child Theme?’ is closed to new replies.