Child theme broke with the new rtpanel theme update


#1

My child theme broke with the new theme update. Hoping for the conclusive answer how to fix it. Thanks for rtcampers.

sulistyo


#2

Hey Sulistyo,

rtPanel has got a major makeover. I have compiled a small fix script here which would help your site from not breaking that much. Try putting the following css in your child theme just after the

@import url("../rtpanel/style.css");
( Parent Theme Styles ) line.

.post-content, .widget, #respond form, select, input, textarea, button {   
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif }  
    h1, h2, h3, h4, h5, h6 { line-height: 136.4%; font-family: inherit; }   

# rtp-primary-menu, img, #rtp-nav-menu li, table, .wp-caption {   
    -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }  
body { line-height: 150% }  
p { line-height: inherit; margin: 0; }  
p:first-child, h1 + p, h2 + p, h3 + p, h1 + ol, h1 + ul, h2 + ol, h2 + ul, h3 + ol, h3 +    ul { margin-top: 0 }  
input[type="button"], input[type="submit"], input[type="reset"], button {  
       box-shadow: none; font-family: inherit; line-height: 100%; min-width: 0; padding: 0; }  
img { margin: 0; max-width: 100%; } ::-webkit-input-placeholder { color: #F0F0F0 }   
input:-moz-placeholder { color: #F0F0F0 } .rtp-horizontal-border, .comments-container, #respond + .rtp-comments-header { padding: 0; margin: 0; border: 0; }   

#main-wrapper { margin: 0 auto; max-width: 100%; }  

#header-wrapper, #content-wrapper { max-width: 100% }  

#header { margin: 0; width: 100%; }  

#content { float: left }  

#sidebar { float: right }  

#content, #sidebar { margin-left: 0; margin-right: 0; }  

#rtp-primary-menu { background: none; margin-left: 0; }  

#rtp-primary-menu, #rtp-nav-menu ul, #rtp-nav-menu ul li a { border: 0 }  

#rtp-nav-menu { width: 100% } .hentry:first-child { padding: 0 } .post-content p { margin: 0 0 24px } h2.post-title, h1.post-title { font-size: 2.2em; float: none } .post-meta .post-publish { float: left } .post-meta p, .rtp-navigation { font-size: 10px } .post-content img.alignnone { margin: 10px 10px 10px 0 } .rtp-readmore, .rtp-readmore:visited { margin: 0 } .rtp-single-post img, .rtp-singular img { max-width: 100% } .rtp-single-post .post-content a, .rtp-singular .post-content a { text-decoration: none } .widget { line-height: 153.9%; margin-top: 0; clear: both; overflow: hidden; } .widget\_search, .widget\_text { margin-top: 0; margin-bottom: 0; }   

#sidebar .widget .widgettitle { font-size: 1.2em; padding: 0; margin: 0 }  

#sidebar .rtp-subscribe-widget-container .social-icons li { margin: 0 }  

#sidebar .rtp-subscribe-widget-container .social-icons li a { height: 35px; width: 35px; background: url('./img/rtp-social-icons-32-32.png') no-repeat; }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.facebook { background-position: 0 0 }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.facebook:hover { background-position: 0 -44px }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.twitter { background-position: -44px 0 }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.twitter:hover { background-position: -44px -44px }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.google { background-position: -264px 0 }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.google:hover { background-position: -264px -44px }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.rss { background-position: -88px 0 }  
#sidebar .rtp-subscribe-widget-container .social-icons li a.rss:hover { background-position: -88px -44px }  

.rtp-has-comments { width: 100% }  
.comments-container .rtp-comment-count { padding: 0 }  
.rtp-comment-count > h2 { font-size: 12px }  
comment::-webkit-input-placeholder { color: #000 }  
comment:-moz-placeholder { color: #000 }  
.comment-body + #respond { margin-top: 15px }  
footerbar { overflow: hidden }  

footerbar .widget { clear: none }  

.footerbar-widget:nth-child(3n+1) { clear: none }  
footerbar:after, #footer-wrapper:after { border-bottom: 0; display: none; height: 0; top: 0; }  

Once that is done try adding the following code to your child theme functions.php

function rtp_child_hooks_handling() {  
    remove_filter( 'the_excerpt', 'rtp_no_ellipsis' );  
    remove_action( 'rtp_hook_end_post_title', 'rtp_default_comment_count');  
}  
add_action( 'init', 'rtp_child_hooks_handling' );  

add_action( 'rtp_hook_end_post_meta_top', 'rtp_default_comment_count' );  

function rtp_child_no_ellipsis( $text ) {  
    global $post, $rtp_post_comments;  
    $read_text =  ( !empty($rtp_post_comments['read_text'] ) ) ? $rtp_post_comments['read_text'] : '';  
    $text = str_replace( '[...]', '…', $text );  
    $text .= apply_filters( 'rtp_readmore', ( ( $read_text ) ? '' . esc_attr( $read_text ) . '' : '' ));  
    return $text;  
}  
add_filter( 'the_excerpt', 'rtp_child_no_ellipsis' );  

function rtp_child_read_more_braces( $read_text ) {  
    return '[ '.$read_text.' ]';  
}  
add_filter( 'rtp_readmore', 'rtp_child_read_more_braces' );  

The above fix should help your site from breaking badly. You would still have to do minor css fixes which would have been caused due to the specificity. Let me know if this helps.


#3

HI Joshua,
First,Thanks for your quick reply. i’ll try it on my Xampp.My other question is does the fresh install of the parent theme and child theme (then do copy the old child theme css to the new ones) could be another alternative since i Think that it will more easier rather than adding fix script you wrote above?.

Thanks,


#4

Yes you could do that or just installing the fresh rtPanel 2.1.1 would also do. As the new rtPanel Child Theme is still not yet updated. If updated also it would just have some extra examples of hooks and some primary css modifications to help you get started alongwith the new version of rtPanel.
Basically you would be fine with just a fresh install of rtPanel.


#5

Thanks Joshua,

I’ll run on the second options first, since I am afraid that (by adding script) there’ll be some doubled and too much commands on my child theme css and function.

Thanks for your hospitality.


#6

Yes, basically this should act as a temporary fix. I would suggest you try to recreate your theme on the new version for better optimized CSS.
Let me know if you would require any more help with the transition.


#7

Yap, I’ll play with it, and I’m sure that it’ll be as easy as it used to be since rtPanel is a great and solid theme framework.

Thanks…


#8