How To Use Sass With WordPress

There are many benefits of Sass for WordPress developers. You’ve probably heard many arguments for using a pre-processor by now. CSS pre-processors provide the opportunity for better code organization by using partials and nesting styles. Pre-processors help developers style faster by writing mixins and functions. Pre-processors also allow us to write more maintainable, scalable code with logic and variables.

Convert a Stylesheet to Sass

The best way to start using Sass in WordPress development is to use a theme that has Sass files included. The Underscores theme is my favorite starting place for a new theme. However, if you’re starting with a theme that doesn’t have Sass files included, you’ll need to convert the existing stylesheet to Sass.

The good news is that if you’re using the .scss syntax (which I recommend), your existing CSS is all valid Sass. You can simply copy style.css to style.scss and that .scss file will compile properly.

Setting Up Partials

At this point, you’ve got a long .scss file with just as much code as your original CSS file. You can now use variables and mixins, but this still isn’t organized better yet. We can get some much-needed organization by breaking the long stylesheet up into smaller files. Copy each “section” of style.css to a separate .scss file in your Sass folder. Name this file after what it contains with an underscore prefix. For example, your styles relating to your navigation go to _navigation.scss.

Once you’ve moved code to a partial, you’ll need to import that partial in your main style.scss file. Essentially, you’ll copy all the navigation code to _navigation.scss and replace it in style.scss with an import command. Note: the file name in the import does not have the underscore or the extension.

Read More

The Ultimate Guide To WordPress Keyboard Shortcuts

In this tech-savvy day and age, keyboard shortcuts are nothing new. In fact, you probably use these types of shortcuts every day. For example, when Windows users want to Copy and Paste something, most will use the shortcut CTRL + C, and then, CTRL + V to execute the action. But did you know that WordPress has its own set of keyboard shortcuts?

Yup, it’s true! And they can help make your life a whole lot easier. Instead of just mentioning a few helpful shortcuts that we hand picked, we are going to give you a full guide to all the Keyboard Shortcuts that are available to use in WordPress. That way you can bookmark this page and use it at your leisure in order to quickly learn all the keyboard shortcuts that are available to use in WordPress.


Grid Systems and Frameworks

Website Resource by ilsa

As I’m watching a video on responsive designs the instructor goes through a bunch of grid systems to explore. I feel I have to write them down to dive into later, they are:

Since I am writing about grid systems I should also link up some frameworks, most of which have a grid system as part of their framework. Frameworks being more complicated I will delve into these after checking out the grid systems.

Phew, that’s a lot of reading! I don’t know when I’ll have time, some may wind up being obsolete by the time I get to them.  Nonetheless, here they are.

View original post

WooCommerce FrontEnd Add-on

Product Description

WooCommerce-FrontEnd_by-Vivacity-InfoTechWooCommerce FrontEnd product manager is a powerful WooCommerce add-on that helps to manage all the user’s products, their product orders, profile settings and other WooCommerce settings from the front-end of your site. No back-end access required for the user to set up his own products on your site. This add-on will also add the feature of user registration, user front-end login and all WooCommerce plugin feature. It`s a complete package for the users to manage everything regarding their products, their product orders, their profile, there WooCommerce settings along with the PayPal payment settings. Adding, editing, updating, trashing and permanently deletion of product feature is also available. User can view their product orders with different view options as completed, pending and all orders and can also mark them as completed. User can also view the information of the product buyer. Profile edit, WooCommerce settings such as billing and shipping address and PayPal account setting option is also available. To use this add-on feature just user this [woo_frontend_product_manager] short-code and the whole setup will be done automatically.

Buy Now $49

Magento passing value from layout to block


Pass variables from a layout to a block

Yes, We can insert variable into a block from layout xml file as bellow,

<reference name="root">
   <block type="yourmodule/testblock" name="testpage">
        <action method="setData"><name>product_id</name><value>10</value></action>

Using the action tag with the method=”setData” attribute. Its child tags name and value to set variable and its value.

setData method of block is called when the system loads layout. name, value tags are parameters of setData method.

In block file you can access this by,

$productId = $this->getProductId(); 
$productId = $this->getData(‘product_id’);

Used in CMS page

we can put variables into a block by,

{{block type="yourmodule/testblock" product_id=10 template="module/yourmodule/bestproduct.phtml"}}

View original post

Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address.

Baljit Web Developer

In Magento Community you need to copy the file:


and change line 238 from:
$request[‘address_override’] = 1;

$request[‘address_override’] = 0;

View original post

Script to create 301 redirects in Magento

Piyush A. Sahu

Below is the code to create 301 URL redirect by inserting values from a CSV file

The Columns of the csv file would be 1)Target URL 2)Target URL



The Source Code:

* This file is used for 301 Url Redirect Import via CSV file.
* PHP versions All
* @category   PHP Coding File
* @version    1.1.0
* @author Piyush Sahu

//error_reporting(E_ALL | E_STRICT);

//Please Change the path of the Mage.php of your magento installation
require_once ‘../app/Mage.php’;

ini_set(‘memory_limit’, ‘1024M’);

//This Is the name of the file Which has data in CSV as per the requirements With Column Headers
$fileToRead = ‘duplicate_url.csv’;

// Read the File
$handle = fopen($fileToRead, “r”);
$rowno = 1;

echo ‘<table style=”font-family: Verdana; font-size: 11px” border=”1″>’;
echo ‘<tr>’;
echo “<td><strong>Row No.</strong></td><td><strong>Long Target URL</strong></td>
<td><strong>Short URL</strong></td><td><strong>Status</strong></td></tr>”;
$db = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’);
$urlRewrite = Mage::getSingleton(‘core/url_rewrite’)

try {
while (($data =…

View original post 142 more words