Digital experiences for all disciplines
Forum Replies Created
-
-
Hi David,
Thank you for the info – and I will change the menu items. 🙂
I’m all set with this issue – you can close it. Thank you! 🙂
Thank you David – that worked perfectly! 🙂
So – how do we remove the breadcrumb? 🙂
yes – we’re trying something different. The owner of the store did not like the hero tabbed.
Hi David,
Yes – that’s the site. We wanted to change the color of the background on the category pages. Please see attached image for reference.
Thank you,
DawnaAttachments:
You must be logged in to view attached files.Okay – thank you. Does that apply to changing the color of the background as well?
Thank you for sending me that image. It helped me to realize that the screen display had been changed on my computer and I was viewing the page in zoom mode. I had my internet service company working on our wifi yesterday and they must have messed with the settings.
So sorry for the confusion.
On a related note, how do I change the background color surrounding the tabbed area? And, can we add a shadow to the tabbed area – similar to what’s in the attached image.
Thank you for your help and patience! 🙂
DawnaAttachments:
You must be logged in to view attached files.I think there is another solution. It was fine before on the screen I’m using now – 15″ and has recently changed. We also checked on a desktop computer and it looks the same. So different size monitors are all showing the same thing.
You mean to tell me we have no control on the layout of category pages? That doesn’t sound right.
Dawna
In case anyone is wondering how we solved this – here are the instructions. You will need to use FTP to access the correct files).
1. Override ‘variable.php‘ file by copying it from ‘woocommerce/single-product/add-to-cart/variable.php‘ to your theme directory. For example; #your_theme_location/woocommerce/single-product/add-to-cart/variable.php.
2. Once done, edit variable.php and lookout for the code as the one shown below (In woocommerce version 2.4.7, the below code was starting at line 27 and ends at line 38):
<?php foreach ( $attributes as $attribute_name => $options ) : ?>
<tr>
<td class=”label”><label for=”<?php echo sanitize_title( $attribute_name ); ?>”><?php echo wc_attribute_label( $attribute_name ); ?></label></td>
<td class=”value”>
<?php
$selected = isset( $_REQUEST[ ‘attribute_’ . sanitize_title( $attribute_name ) ] ) ? $_REQUEST[ ‘attribute_’ . sanitize_title( $attribute_name ) ] : $product->get_variation_default_attribute( $attribute_name );
wc_dropdown_variation_attribute_options( array( ‘options’ => $options, ‘attribute’ => $attribute_name, ‘product’ => $product, ‘selected’ => $selected ) );
?>
</td>
</tr>
<?php endforeach;?>replace it with the below code:
<?php $variations_arr = array();
foreach ( $attributes as $attribute_name => $options ) : ob_start(); ?>
<tr>
<td class=”label”><label for=”<?php echo sanitize_title( $attribute_name ); ?>”><?php echo wc_attribute_label( $attribute_name ); ?></label></td>
<td class=”value”>
<?php $selected = isset( $_REQUEST[ ‘attribute_’ . sanitize_title( $attribute_name ) ] ) ? wc_clean( $_REQUEST[ ‘attribute_’ . sanitize_title( $attribute_name ) ] ) : $product->get_variation_default_attribute( $attribute_name ); wc_dropdown_variation_attribute_options( array( ‘options’ => $options, ‘attribute’ => $attribute_name, ‘product’ => $product, ‘selected’ => $selected ) ); echo end( $attribute_keys ) === $attribute_name ? ‘‘ . __( ‘Clear selection’, ‘woocommerce’ ) . ‘‘ : ”; ?>
</td>
</tr>
<?php $variations_ob = ob_get_clean(); $variations_arr[wc_attribute_label($attribute_name)] = $variations_ob; endforeach;foreach ($variations_arr as $name => $ob) { echo str_ireplace(‘choose an option’, ‘Choose ‘.$name, $ob );
} ?>Once done, save ‘variable.php‘ file and refresh your product page to see ‘Choose an option” replaced with ‘Choose <attribute_name>’. That’s it!
Okay – so where are those files located? I don’t see them in the Appearance –> Editor area.
Hi Kyle,
The instructions I received are:
Go to variable.php
Look for this on line 24
<option value=””><?php echo __( ‘Choose an option’, ‘woocommerce’ ) ?>…</option>
and replace it with
<option value=””><?php echo sprintf( __( ‘Choose a %s’, ‘woocommerce’ ), $woocommerce->attribute_label( $name ) ) ?>…</option>
or you can just replace the ‘Choose an Option’ with the text of your choice
Where is the variable.php file?
How do I do that? When I go to their website, they say they only offer support for paying customers. Is there a another way to contact support?
Best,
DawnaHi David,
It worked. 🙂 Thank you.
Perfect!!!! Thank you for your help! 🙂
-
Posted in: Reply To: Category Pages