Tagged: x
-
AuthorPosts
-
October 10, 2016 at 3:06 pm #1210422
fervanrijswijkParticipantI’ve downloaded the newest theme x, and the child theme. Inside the childtheme there is an output.php, but this file does not get overridden. Do I need to do something to activate this file?
October 10, 2016 at 4:58 pm #1210543
JadeModeratorHi there,
To override the template, you will have to edit the files and place them in /wp-content/themes/x-child/framework/views directories.
Hope this helps.
October 13, 2016 at 2:05 pm #1215151
fervanrijswijkParticipantYes, i copied it to:
wp-content/themes/x-child/framework/views/global/_admin/customizer/output.phpbut it doesn’t work
October 13, 2016 at 2:33 pm #1215184
fervanrijswijkParticipantThis file should be overridden, so i placed this past and file in x-child
wp-content/themes/x-child/framework/functions/global/admin/customizer/output.phpOctober 13, 2016 at 7:54 pm #1215523
Rue NelModeratorHello There,
Thanks for updating in! Your child theme function override may not work because the child theme is more of a template override and not a functions file override. Please keep in mind that only the files in the views folder can be overridden with template customizations. Please see our knowledge base on the customization best practices: https://community.theme.co/kb/customization-best-practices/
What have you change or may have added on the file? Could please post it in your next reply?
Thank you.
October 16, 2016 at 2:13 am #1217866
fervanrijswijkParticipantThanks for your response. I would like to customize the backstrecth. It does not do what I want
October 16, 2016 at 3:08 pm #1218457
RadModeratorHi there,
Overriding functions is different from templates. That one is a function file.
If you wish to override it then please add this code to your child theme’s functions.php
function x_customizer_output_js_custom() { $x_custom_scripts = x_get_option( 'x_custom_scripts' ); $entry_id = get_queried_object_id(); $x_entry_bg_image_full = get_post_meta( $entry_id, '_x_entry_bg_image_full', true ); $x_entry_bg_image_full_fade = get_post_meta( $entry_id, '_x_entry_bg_image_full_fade', true ); $x_entry_bg_image_full_duration = get_post_meta( $entry_id, '_x_entry_bg_image_full_duration', true ); $x_design_bg_image_full = x_get_option( 'x_design_bg_image_full' ); $x_design_bg_image_full_fade = x_get_option( 'x_design_bg_image_full_fade' ); ?> <?php if ( $x_custom_scripts ) : ?> <script id="x-customizer-js"> <?php echo $x_custom_scripts; ?> </script> <?php endif; ?> <?php if ( $x_entry_bg_image_full ) : ?> <?php $page_bg_images_output = ''; $page_bg_images = explode( ',', $x_entry_bg_image_full ); foreach ( $page_bg_images as $page_bg_image ) { $page_bg_images_output .= '"' . $page_bg_image . '", '; } $page_bg_images_output = trim( $page_bg_images_output, ', ' ); ?> <script>jQuery.backstretch([<?php echo $page_bg_images_output; ?>], {duration: <?php echo $x_entry_bg_image_full_duration; ?>, fade: <?php echo $x_entry_bg_image_full_fade; ?>});</script> <?php elseif ( $x_design_bg_image_full ) : ?> <script>jQuery.backstretch(['<?php echo x_make_protocol_relative( $x_design_bg_image_full ); ?>'], {fade: <?php echo $x_design_bg_image_full_fade; ?>});</script> <?php endif; } add_action( 'wp_footer', 'x_customizer_output_js_custom', 9999, 0 ); add_action( 'init', 'remove_x_customizer_output_js', 9999, 0 ); function remove_x_customizer_output_js () { remove_action( 'wp_footer', 'x_customizer_output_js', 9999, 0 ); }Hope this helps.
November 28, 2016 at 2:51 pm #1273656
fervanrijswijkParticipantThanks! this worked for me 🙂
November 28, 2016 at 8:11 pm #1274015
FriechModeratorWe’re delighted to assist you with this.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1210422 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
