badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Ambition Pro & Woocommerce: How to disable background image?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #50613
    f.ramser
    Participant

    Hello,

    On the woocommerce page, the backgroungimage isn’t visible.
    This is ok.
    But the backgroungimage is downloaded.
    The page has 1MB. The background image has 450kb.
    But i didn’t need it to download, because is isn’t visible.
    How can i deactivate the backgroundimage on the woocommerce page?
    (Best solution will be CSS Code in the Style.css)

    Best regards

    #50615

    Hi f.ramser,

    Could you provide us your site Url what exactly are you talking about. If you are a Premium user then please post your forum topic at Ambition Pro.

    Thank you

    #50616
    f.ramser
    Participant
    #50617

    Try adding below custom css. This may help you.

    body.woocommerce-page .page-title-wrap {
        display: none;
        padding: 0;
        height: 0;
    }

    Thank you

    #50618
    f.ramser
    Participant

    As you can see in the shapshot, nothing changed 🙁

    https://h61i.imgup.net/Pictac7e.JPG

    #50620

    Hi f.ramser,

    It needs code customization. Display none will only hides in front end. If you inspect it then then code will be run. If you like to hide background image in woocommerce page then code customization is required.
    Go to theme folder -> inc -> structure -> header-extension.php on line no 266. you will see below code.

    <div class="page-title-wrap" <?php if ( $sitetitle_img_setting != '1'  && $sitetitle_image != '' ){ ?> style="background-image:url('<?php echo esc_url($sitetitle_image);?>');" <?php } ?> >
    						<div class="container clearfix">
    							<?php if(is_home()){?>
    							<h2 class="page-title"><?php echo ambition_header_title();?></h2><!-- .page-title -->
    						<?php } else { ?>
    							<h1 class="page-title"><?php echo ambition_header_title();?></h1><!-- .page-title -->
    						<?php }
    							if (function_exists('ambition_breadcrumb')) {
    								ambition_breadcrumb();
    							}
    						?>
    						</div><!-- .container -->
    					</div><!-- .page-title-wrap -->

    Replace above code and add this below code

    <?php if(!is_woocommerce()){ ?>
    					<div class="page-title-wrap" <?php if ( $sitetitle_img_setting != '1'  && $sitetitle_image != '' ){ ?> style="background-image:url('<?php echo esc_url($sitetitle_image);?>');" <?php } ?> >
    						<div class="container clearfix">
    							<?php if(is_home()){?>
    							<h2 class="page-title"><?php echo ambition_header_title();?></h2><!-- .page-title -->
    						<?php } else { ?>
    							<h1 class="page-title"><?php echo ambition_header_title();?></h1><!-- .page-title -->
    						<?php }
    							if (function_exists('ambition_breadcrumb')) {
    								ambition_breadcrumb();
    							}
    						?>
    						</div><!-- .container -->
    					</div><!-- .page-title-wrap -->
    				<?php } ?>

    We recommended not to change the code because if you change the code then while updating to our new version all your customisation code will be lost. So better make child theme and first unhook the functions and the edit the code.

    http://codex.wordpress.org/Child_Themes

    Thank you

    #50653
    f.ramser
    Participant

    It is working.
    Thank you 🙂

    #50654

    You welcome f.ramser

    Could you also please help us rating this theme in WordPress Repository.
    https://wordpress.org/support/view/theme-reviews/ambition
    We really appreciate your rating.

    Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.