Home Forums WoodMart support forum Do not apply my customizations to the child theme.

Do not apply my customizations to the child theme.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #278572

    mardane
    Participant

    hi

    I use the child Theme. But every change I make in the style.css file does not apply the changes!
    What is the cause of this issue?
    I also want to change a series of views and call in child format, but these changes do not apply.
    for example:
    /wp-content/themes/woodmart/woocommerce/loop/orderby.php

    thank you very much.

    #278596

    Hello,

    Thank you very much for choosing our theme and for contacting us.

    Please add all the styles to the Theme Settings > Custom CSS.

    All the JS files please insert them into the Theme Settings > Custom JS.

    If you add any PHP code, install and activate the child theme and insert the code into functions.php files.

    If you have any questions please feel free to contact us.

    Best Regards

    #278613

    mardane
    Participant

    I wrote the code as follows in the function file and nothing changed

    <?php
    /**
     * Enqueue script and styles for child theme
     */
    function woodmart_child_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/css/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) );
    }
    add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 10010 );
    
    /**
     * Show options for ordering
     *
     * This template can be overridden by copying it to yourtheme/woocommerce/loop/orderby.php.
     *
     * HOWEVER, on occasion WooCommerce will need to update template files and you
     * (the theme developer) will need to copy the new files to your theme to
     * maintain compatibility. We try to do this as little as possible, but it does
     * happen. When this occurs the version of the template file will be bumped and
     * the readme will list any important changes.
     *
     * @see 	    https://docs.woocommerce.com/document/template-structure/
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     3.6.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    }
    
    ?>
    <form class="woocommerce-ordering<?php if ( ! empty( $list ) ): ?>-list<?php endif; ?>" method="get">
    	<?php if ( ! empty( $list ) ): ?>
    		<ul>
    			<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
    				<?php 
    
    					$link = woodmart_shop_page_link( true );
    
    					$link = add_query_arg( 'orderby', $id, $link );
    
    				 ?>
    				<li>
    					<a href="<?php echo esc_url( $link ); ?>" data-order="<?php echo esc_attr( $id ); ?>" class="<?php if(selected( $orderby, $id, false ) ) echo 'selected-order'; ?>"><?php echo esc_html( $name ); ?></a>
    				</li>
    			<?php endforeach; ?>
    		</ul>
    	<?php else: ?>
    		<select name="orderby" class="myclass" aria-label="<?php esc_attr_e( 'Shop order', 'woocommerce' ); ?>">
    			<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
    				<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option>
    			<?php endforeach; ?>
    		</select>
    		<?php
    			// Keep query string vars intact
    			foreach ( $_GET as $key => $val ) {
    				if ( 'orderby' === $key || 'submit' === $key ) {
    					continue;
    				}
    				if ( is_array( $val ) ) {
    					foreach( $val as $innerVal ) {
    						echo '<input type="hidden" name="' . esc_attr( $key ) . '[]" value="' . esc_attr( $innerVal ) . '" />';
    					}
    				} else {
    					echo '<input type="hidden" name="' . esc_attr( $key ) . '" value="' . esc_attr( $val ) . '" />';
    				}
    			}
    		?>
    	<?php endif ?>
    	<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged' ) ); ?>
    </form>
    #278681

    Hello,

    Make sure the code is correct. Our support does not cover customization or fixing customization code.

    Adding a correct code to functions.php of the child them works properly.

    You can test the code on any other theme, activate any default free theme, and add it into the functions.php if the code does not work, it means it is incorrect.

    Best Regards

    #288163

    mardane
    Participant

    hi
    I am using the child version of the Woodmart theme. I want to customize a view in this theme. I put the file related to my favorite view in the following path. But apparently it is not identified at all and nothing happens!
    for examlpe:
    sitename.com/public_html/wp-content/themes/woodmart-child/woocommerce/cart/cart.php
    I copied the Cart.php file from the main theme folder and put it in the same way as the child theme, but it still reads from the main theme file!

    thanks

    #288449

    Hello,

    Our support covers fixing the theme bugs if any, guidance in the theme options, sometimes we provide custom CSS code for minor changes though it is beyond the support, however, customization, fixing custom code is not covered by our support. We do not provide paid services either.

    Please try to find a plugin or developer who would do it for you.

    Best Regards

Viewing 6 posts - 1 through 6 (of 6 total)