Tagged: x
-
AuthorPosts
-
May 18, 2016 at 10:10 pm #998700
martinezgParticipantHi,
I’ve been doing many changes to my parent theme and realised I should duplicate it to a child theme. I’ve done so in this path by copying the entire X folder and renaming it: wp-content/themes/x-child
However, buttons using HTML in cornerstone are not being displayed with this child theme. Screenshot attached.
Why is that and how to resolve it? I just be an exact replica of the parent theme
May 18, 2016 at 10:11 pm #998701
martinezgParticipantscreenshot
May 18, 2016 at 10:12 pm #998705
martinezgParticipanthere is what is should display
May 18, 2016 at 10:47 pm #998736
martinezgParticipantThis reply has been marked as private.May 19, 2016 at 1:29 am #998880
FriechModeratorHi There,
Thanks for writing in! Sorry I am not entirely certain about the button issue, please clarify. But I advice that you re-install the X|Theme first to make sure that your parent theme is back to default state (no modification).
And then download the Child theme here and move all your custom templates in it, and upload it to your site.
Let us know how it goes. Cheers!
May 19, 2016 at 9:05 pm #1000692
martinezgParticipantThat doesnt help. My parent theme has modifications I need to keep.
What part is not clear?
May 19, 2016 at 9:13 pm #1000708
martinezgParticipantI should be able to make a copy of my parent theme and have it as a child right??
May 19, 2016 at 9:49 pm #1000768
martinezgParticipantI’ve followed the steps and dowloaded the X-child theme. Does this mean I can still edit the php files in the X theme folder and any updates won’t apply?
May 19, 2016 at 11:05 pm #1000867
Rue NelModeratorHello There,
Please copy all your custom functions to your child theme’s functions.php file. If you have modified any template, you need to transfer to the child theme too!
You should not be editing any of the php files in the parent theme. Having a child theme will allow you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Hope this helps.
May 21, 2016 at 10:13 am #1002998
martinezgParticipantgreat, thanks!
May 21, 2016 at 10:31 am #1003016
martinezgParticipantIt seems like adding any code to the child theme’s function.php breaks the entire site. This is what I’m trying to add
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= //function to shorten freshness display from say '1 month, 2 weeks' to '1 month' function short_freshness_time( $output) { $output = preg_replace( '/, .*[^ago]/', ' ', $output ); return $output; } add_filter( 'bbp_get_time_since', 'short_freshness_time' ); add_filter('bp_core_time_since', 'short_freshness_time'); function remove_counts($output) { $output = ''; return $output; } add_filter('bbp_get_forum_author_display_name', 'remove_counts' ); function custom_bbp_show_lead_topic( $show_lead ) { $show_lead[] = 'true'; return $show_lead; } add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' ); add_filter ( 'bbp_get_reply_post_date', ntwb_bbpress_enable_date_translation, 10, 6); add_filter ( 'bbp_get_topic_post_date', ntwb_bbpress_enable_date_translation, 10, 6); function ntwb_bbpress_enable_date_translation( $result, $reply_id, $humanize, $gmt, $date, $time ) { $date = get_post_time( get_option( 'date_format' ), $gmt, $reply_id, $translate = true ); $result = sprintf( _x( '%1$s', 'date at time', 'bbpress' ), $date, $time ); return $result; } function bm_bbp_no_breadcrumb ($param) { return true; } add_filter ('bbp_no_breadcrumb', 'bm_bbp_no_breadcrumb'); // show admin bar only for admins if (!current_user_can('manage_options')) { add_filter('show_admin_bar', '__return_false'); } add_filter( 'wp_nav_menu_items', 'autov_add_loginout_navitem', 10, 2 ); function autov_add_loginout_navitem( $items, $args ) { if( $args->theme_location == 'primary' ){ $login_item = '<li class="login">'.wp_loginout($_SERVER['REQUEST_URI'], false).'</li>'; $items .= $login_item; } return $items; }May 21, 2016 at 10:32 am #1003021
martinezgParticipantnever mind. I had to remove it from the parent theme first
May 21, 2016 at 10:39 am #1003030
ThaiModeratorGlad you’ve sorted it out.
If you need anything else, please let us know 🙂
May 21, 2016 at 10:59 am #1003039
martinezgParticipantSorry for the multiple messages. I have 1 more thing. I copied the x/framework/css folder to my child theme but it seems like my site is still using the parent theme ones. How can that be changed?
May 21, 2016 at 12:16 pm #1003083
ThaiModeratorHi @martinezg,
All your custom CSS should be placed under style.css file in your child theme.
You don’t have to copy the CSS files from the parent theme to child theme.
Regards!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-998700 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
