<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Customizing WooCommerce: Best Practices - CODIBU</title>
	<atom:link href="https://help.codibu.com/kbtopic/customizing-woocommerce-best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.codibu.com</link>
	<description>Hosting &#38; Domain,  Development &#38; Design, SEO &#38; Marketing, 2300+ Themes &#38; Plugins, Free SEO analysis &#38; tools</description>
	<lastBuildDate>Sat, 07 Nov 2020 09:52:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://help.codibu.com/wp-content/uploads/2022/07/favicon.png</url>
	<title>Customizing WooCommerce: Best Practices - CODIBU</title>
	<link>https://help.codibu.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Customizing WooCommerce: Best Practices</title>
		<link>https://help.codibu.com/blog/customizing-woocommerce-best-practices/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=customizing-woocommerce-best-practices</link>
					<comments>https://help.codibu.com/blog/customizing-woocommerce-best-practices/#respond</comments>
		
		<dc:creator><![CDATA[JN C]]></dc:creator>
		<pubDate>Sat, 07 Nov 2020 09:52:35 +0000</pubDate>
				<guid isPermaLink="false">https://help.codibu.com/kb/customizing-woocommerce-best-practices/</guid>

					<description><![CDATA[<p>The best thing about WordPress and WooCommerce is code and content can be changed to suit — modify and customize your website entirely. Flexibility is one<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://help.codibu.com/blog/customizing-woocommerce-best-practices/">Customizing WooCommerce: Best Practices</a> first appeared on <a href="https://help.codibu.com">CODIBU</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The best thing about WordPress and WooCommerce is code and content can be changed to suit — modify and customize your website entirely.</p>
<p>Flexibility is one of the greatest benefits to using WooCommerce to sell online. Plugins, extensions and themes can be used to fulfill requirements, then adjusted and coded to tailor the look and functionality of your site.</p>
<p>However, there are some <strong>best practices</strong> to follow when making site tweaks, and it’s not always obvious how these changes must be made.</p>
<p>&nbsp;</p>
<div class="woo-sc-box note   "><b>Note:</b> We are unable to provide support for customizations under our <a href="https://help.codibu.com/blog/kb/support-policy/"><span class="s2">Support Policy</span></a>. If you are unfamiliar with code/templates and resolving potential conflicts, select a <span class="s2">WooExpert or Developer</span> for assistance.</div>
<p>&nbsp;</p>
<h2 id="section-1">Why best practices?</h2>
<p>Many users customize their theme from the default look, changing the link color and also the layout and feel. Most dive straight in and modify code, which is the easiest way to do it. But this leaves the problem of updating in the future, since all modifications are lost when files are overwritten with a new version.</p>
<p>What we want to show you in this tutorial are the best ways to customize your theme, so updating is as painless as possible, and you are in control of customizations.</p>
<p>There are two ways to customize:</p>
<ul>
<li><strong>Plugin</strong> — minor changes</li>
<li><strong>Child theme</strong> — major alterations</li>
</ul>
<h2 id="section-2">Using a plugin</h2>
<p>If you only plan on making minor modifications to the stylesheet or CSS, then the best option is to use a plugin that allows you to add custom styling.</p>
<h3 id="section-3">Jetpack for CSS or Sass changes</h3>
<p>Our recommendation is to use <strong>Jetpack </strong>for changes related to CSS or Sass.</p>
<p>Install Jetpack. Once that is done, go to <strong>your website &gt; Dashboard &gt; Jetpack &gt; Settings</strong> and enable <strong>Custom CSS</strong>.<a href="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.23.54.png" rel="prettyPhoto"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-160924" src="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.23.54.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.23.54.png 1236w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.23.54.png?resize=550,131 550w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.23.54.png?resize=768,183 768w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.23.54.png?resize=950,226 950w" alt="Custom CSS in Jetpack" width="1024" height="244" /></a></p>
<p>Next, you can go to <strong>Appearance &gt; Edit CSS</strong>. There you’ll be able to add all your custom CSS styles.</p>
<p><strong>Example</strong></p>
<p>Let’s look at an easy example where we use <strong>Chrome Dev Tools</strong> to find the navigation link color in the Storefront theme. We inspect the element as follow: <strong>right click on the element &gt; inspect</strong>, and it will show us what the style for the nav element is called.<br />
<a href="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.09.25.png" rel="prettyPhoto"><img decoding="async" class="alignnone size-full wp-image-160922" src="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.09.25.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.09.25.png 1274w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.09.25.png?resize=550,304 550w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.09.25.png?resize=768,425 768w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.09.25.png?resize=950,526 950w" alt="Chrome Dev Tools Inspect" width="1024" height="567" /></a></p>
<p>We see in the screenshot above that the style for the link color in the navigation:<br />
<a href="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.10.45.png" rel="prettyPhoto"><img decoding="async" class="alignnone size-full wp-image-160923" src="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.10.45.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.10.45.png 1275w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.10.45.png?resize=550,305 550w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.10.45.png?resize=768,425 768w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.10.45.png?resize=950,526 950w" alt="Styles to visible in Chrome Dev Tools" width="1024" height="567" /></a></p>
<pre>.main-navigation ul li a {
  color: #ffffff;
}
.main-navigation ul li a:hover {
  color: #e6e6e6;
}</pre>
<p>Then we paste <strong>this into custom.css</strong>, we want to change the color so to red, and the hover color to white. We also remove the other styles which we won’t be changing so it ends up looking like this:</p>
<pre>.main-navigation ul li a {
  color: red;
}
.main-navigation ul li a:hover {
  color: white;
}</pre>
<p>Once you save <strong>custom.css</strong> and refresh your page you will notice the nav link color is now red, and if you hover over it, it will turn white.</p>
<figure id="attachment_160921" class="wp-caption alignnone" aria-describedby="caption-attachment-160921"><a href="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.07.12.png" rel="prettyPhoto"><img loading="lazy" decoding="async" class="size-full wp-image-160921" src="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.07.12.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.07.12.png 1273w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.07.12.png?resize=550,298 550w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.07.12.png?resize=768,416 768w, https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2016-03-16-at-13.07.12.png?resize=950,514 950w" alt="Changes after applying custom CSS" width="1024" height="554" /></a><figcaption id="caption-attachment-160921" class="wp-caption-text">Changes after applying custom CSS</figcaption></figure>
<p>You can also add new styles to your the stylesheet to supplement those already in the theme. If the theme ever gets updated, Jetpack will keep your styles intact. We always do recommend backing up your theme before updating to a newer version, and also check out our <a title="Upgrade your WooTheme" href="https://help.codibu.com/blog/kb/how-to-update-woocommerce/" rel="nofollow" data-bitly-type="bitly_hover_card">upgrade tutorial</a> on how to do it.</p>
<h3 id="section-4">Code Snippets for PHP</h3>
<p>The Code Snippets plugin allows you add snippets to your site rather than pasting it in the <code>functions.php</code> file, write a brief description so you know what it does, and activate or deactivate these snippets as needed.</p>
<p><a href="https://help.codibu.com/wp-content/uploads/2020/11/codesnippets.png" rel="prettyPhoto"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-161880" src="https://help.codibu.com/wp-content/uploads/2020/11/codesnippets.png" sizes="(max-width: 731px) 100vw, 731px" srcset="https://help.codibu.com/wp-content/uploads/2020/11/codesnippets.png 731w, https://help.codibu.com/wp-content/uploads/2020/11/codesnippets.png?resize=550,374 550w" alt="codesnippets" width="731" height="497" /></a></p>
<h2 id="section-5">Using a child theme</h2>
<p>If you wish to modify the stylesheet or CSS of a popular theme, then the best option is to use a child theme to preserve customizations against future updates.</p>
<h3 id="section-6">Using a premium child theme</h3>
<p>Many popular themes have child themes that can be installed and activated to modify the look of the parent theme without coding or styling adjustments. A purchases child theme should <strong>not</strong> be used for custom code but is a way to change the look of a theme through someone else’s design. For example, for our Storefront theme, we have quite an extensive catalog of child themes available.</p>
<p>A child theme like this will not be a great tool for adding custom code, for the same reason as you should avoid adding custom code to the parent theme; if there’s an update to the child theme, all of your custom code will be overridden as well.</p>
<h3 id="section-7">Using a custom child theme</h3>
<p>Alternatively, you can create the child theme yourself. This would be like adding a layer on top of your parent theme with the only purpose being to give priority to your custom code and avoiding your code being discarded at the next update of our parent theme.</p>
<p>You can create your own child theme using our tutorial; <a href="https://help.codibu.com/blog/kb/set-up-and-use-a-child-theme/">Set up and use a child theme</a>.  More on how child themes work also on WordPress.org at Child Themes.</p>
<h2 id="section-8">Resources</h2>
<ul>
<li>Child themes</li>
<li>How to safely add custom code to WordPress</li>
<li>WooCommerce customization tips</li>
</ul><p>The post <a href="https://help.codibu.com/blog/customizing-woocommerce-best-practices/">Customizing WooCommerce: Best Practices</a> first appeared on <a href="https://help.codibu.com">CODIBU</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://help.codibu.com/blog/customizing-woocommerce-best-practices/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
