Category: code

  • https code

    In the .htaccess text file, add: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]

  • sticky bottom menu

    HTML: <!– bottom bar ================================================== –> <div class=”navbar”> <a href=”” class=”active”><i class=”fa fa-map-marker”></i></a> <a href=”” class=”active”><i class=”fa fa-phone”></i></a>   CSS: /* ——————————————————————- * responsive: * bottom menu * ——————————————————————- */ /* Place the navbar at the bottom of the page, and make it stick */ .navbar { background-color: none; overflow: hidden; position: fixed; bottom: 0;…

  • change text Woocommerce php

    ‘add to cart’ Button Text woocommerce/includes/class-wc-product-simple.php ‘select options’ Button Text woocommerce/includes/class-wc-product-variable.php sort by options pull-down Text themes/function.php

  • icons before or after menu items

    CSS: #header nav > ul > li a.icon:before { color: #fff; float: right; margin-left: 0.3em; } #header nav > ul > li a:hover { color: #ED1C24 !important; } #header nav > ul > li a.icon:hover:before, #header nav > ul > li a.icon.active:before { color: #ED1C24; } HTML: <!– Header –> <header id=”header”> <a href=”index.html”><img src=”images/logo-red-text.png”…

  • Using CSS Opacity to Create Transparent Images

    CSS: #img1 { opacity: 1 } #img2 { opacity: 0.6 } HTML: Using CSS Opacity for Backgrounds You can assign opacity to backgrounds in two ways. In the first way, you specify a value for the opacity property as you saw in the examples we worked on so far. div {   opacity: 0.5; } In…

  • Active Class for WordPress

    If WordPress Theme doesn’t support ability indicate the current page, you can add script to your functions.php and use the .active CSS Class to style the current navigation item. Add to functions.php: /* * Active Class Menu */ add_filter(‘nav_menu_css_class’ , ‘special_nav_class’ , 10 , 2); function special_nav_class($classes, $item){ if( in_array(‘current-menu-item’, $classes) ){ $classes[] = ‘active…

  • Paypal image Checkout

    wp-content/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php $icon = ‘https://www.paypalobjects.com/webstatic/mktg/logo/AM_mc_vs_dc_ae.jpg’; Addjust size in the theme CSS: li.payment_method_paypal img { height: 55px; } or remove image: li.payment_method_paypal img { display: none; }

  • Remove “What is Paypal”

    Place in theme css: template.css // style.css /* Paypal ==================================== */ a.about_paypal { display: none !important; } li.payment_method_paypal img { height: 55px; }

  • edit checkout page

    add elements below the review order and above the payment section: wp-content/plugins/woocommerce/templates/checkout/review-order.php <tr><td>ADD HTML</td></tr> <?php do_action( ‘woocommerce_review_order_after_order_total’ ); ?> </tfoot> </table>  

  • get the date format

    <?php echo date_i18n( get_the_date(‘m-d-Y’) );?> vs. <?php echo date_i18n( the_date(‘m-d-Y’) );?>   get_the_date posts a date even for blogs time-stamped the same day. the_date posts the first of blogs time-stamped the same day.