Logout
PERSONEL BLOG WEBSITE
SHAHRUKH170.COM

1-CHANGING CURRENCY SYMBOL OF STOREFRONT THEME - Dec 23, 2017 10:47 pm

Norway

1-CREATING A CHILD THEME FOR MAKING CHANGES

(1)First you will have to download storefront theme and install it via dashboard appearence section (2)Then you will have to develop a child theme is make the appropriate modifications to your website [ modificaition of changing currency symbol ] (3)you will have to make a folder in wp-content/themes/ path with storefont-child name. (4) Then you will have to create two files , style.css and functions.php (5) check these urls for making a child theme folder , style.css and functions.php creation https://optimizerwp.com/wordpress-child-theme/ https://codex.wordpress.org/Child_Themes https://docs.woocommerce.com/document/set-up-and-use-a-child-theme/ (6)Then you will have to copy images folder , css folder , java script folder to parent directory of storefront theme and also to storefront-child theme folder too. (7)paste the custom code of style.css and functions.php to the storefront-child folder's style.css and functions.php (8)you will have to install childtheme too in appearence section of dashboard of wordpress too , this means first install parent theme that is storefront and then install childthem storefont-child too afer parent theme. (9)Now load the website in the browser , to see the changes that you have made ....

Norway

2-CODE SAMPLE's for making the modification

header.php code <?php /** * The header for our theme. * * Displays all of the <head> section and everything up till <div id="content"> * * @package storefront */ ?><!doctype html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Shahrukh</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="google-site-verification" content="Rp2bApUCk4y3joHmDTlq0CEZutWHlVXHrh_XFLIMx84" /> <?php wp_head(); ?> </head> <body class="well" onload="loadRequest()" <?php body_class(); ?>> <div class="container"> <div class="row" style="margin-top:75px;"> <div class="navbar navbar-default navbar-fixed-top" style="background-color:#EEEEEE;padding:5px;box-shadow: 0 3px 2px grey;"> <div class="col-md-2"> <div class="navbar-header"> <button type="button" id="nav-icon1" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false" aria-controls="navbar"> <span> </span> <span></span> <span></span> </button> </div> <a style="position:absolute;top:10px;" href="#"><h1>Shahrukh<span class="color">.</span></h1></a> </div> <div class="col-md-6 col-sm-offset-2"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <?php wp_nav_menu(array('theme_location'=>'primary','container' => false,'menu_class' =>'primary-menu')); ?> </ul> </div> </div> <div class="col-md-2"> <?php /** * Functions hooked into storefront_header action * * @hooked storefront_skip_links - 0 * @hooked storefront_social_icons - 10 * @hooked storefront_site_branding - 20 * @hooked storefront_secondary_navigation - 30 * @hooked storefront_product_search - 40 * @hooked storefront_primary_navigation_wrapper - 42 * @hooked storefront_primary_navigation - 50 * @hooked storefront_header_cart - 60 * @hooked storefront_primary_navigation_wrapper_close - 68 */ do_action( 'storefront_header' ); ?> </div> </div> </div> </div> </div> functions.php code given below // Remove all currency symbols function sww_remove_wc_currency_symbols( $currency_symbol, $currency ) { $currency_symbol = ''; return $currency_symbol; } add_filter('woocommerce_currency_symbol', 'sww_remove_wc_currency_symbols', 10, 2); // Change the US currency symbol function sww_change_wc_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'GBP': $currency_symbol = 'USD'; break; // Can use this for any currency symbol } return $currency_symbol; } add_filter('woocommerce_currency_symbol', 'sww_change_wc_currency_symbol', 10, 2); /** add_filter( 'woocommerce_currencies', 'add_custom_currency' ); function add_custom_currency( $currencies ) { $currencies['3DIGITCODE'] = __( 'Name of Currency', 'woothemes' );

Norway
3-REMOVING MOBILE MENU ICON FROM SITE

After this you can see that site icon showing site name and the title or information about the site , you can remove it by commenting the functions files path /wp-content/themes/storefront/inc/storefront-template-hookups.php /** * Header * * @see storefront_skip_links() * @see storefront_secondary_navigation() * @see storefront_site_branding() * @see storefront_primary_navigation() */ //add_action( 'storefront_header', 'storefront_skip_links', 0 ); //add_action( 'storefront_header', 'storefront_site_branding', 20 ); //add_action( 'storefront_header', 'storefront_secondary_navigation', 30 ); //add_action( 'storefront_header', 'storefront_primary_navigation_wrapper', 42 ); //add_action( 'storefront_header', 'storefront_primary_navigation', 50 ); //add_action( 'storefront_header', 'storefront_primary_navigation_wrapper_close', 68 ); /** this will hide/remove the mobile menu icon when the site is loaded on the mobile [ second menu showing up in the header.

4-LAST WORDS:

You can change /add new currencies to the woocomerce using the code i have pasted above.The style sheet can be using to style the menu cart items and currency symbol . useful links : https://nicola.blog/2015/03/06/change-the-sale-badge-text-in-woocommerce/ https://gist.github.com/lukecav/fd2ac46b13ef8fef97b5816bbbfb5d54 https://docs.woocommerce.com/document/add-a-custom-currency-symbol/ https://www.sellwithwp.com/pricing-remove-currency-symbol/

Views 106564


Advertise Here

Content goes here Web hosting


Search

You can Search This Website,Bing and Google here !


Share This Website


Membership/Join Me

You can subscribe to our services here!


Tags

rania queen rania queen rania of jordon life complete complete life dead dead man dead man walking combustion octane analysis Zika Zika Virus turbo analysis sales wordpress woocommerce changing currency symbol Rockets Nozzles Expanders NozzleAnalysis Earn Money Blogger Online-business


DONATE/SUBSCRIBE FORM

My Price

  • Basic
  • Web Design
  • SEO
  • Mail Support
  • $ 10

    per month
  • Pro
  • Web Design
  • SEO
  • Endless Support
  • $ 25

    per month

LOGIN MEMBERS PAGE

THANK YOU FOR YOUR ORDER!

You have successfully joined my mailing list and our program ..

SEARCH

SUBSCRIBE

Join my mailing list to receive updates on the latest blog posts and other things.