How to Remove WooCommerce Generator Tag

WooCommerce Generator Tag

WooCommerce Generator TagSometime we needed our Code to be clean without any extra meta tags generated by different WordPress Plugins we have installed on our site. Like many other plugins, WooCommerce also added it’s Generator Tag into Source Code of your website.

If you are not debugging your website than it’s good to remove this tag for above reason and one other more important reason i.e. Security purpose. Some time we finished website for a client and later you are not managing the website updates and it’s on client end.. most probably they won’t do any updates on there website leaving security hole into there website by letting people know which version they are using for particular plugin.
Like WordPress, Plugin author keep there plugins updated maintaining themself updated with new code of WordPress but if you have old version on your website there are chances someone attack your website by manipulating old plugins security holes.

Good thing about WooCommerce is that it allows different hooks and functions to over ride it’s default outputs of code, which make things lot easier if you understand what you wanted to achieve.

here is the code snippet to remove WooCommerce Generator Tag from the source code of your WordPress Website, you can add this into functions.php file:

Remove WooCommerce Generator Tag from version 2.1 and latest

function my_woocommerce_loaded_function() {
 global $woocommerce;
 remove_action( 'wp_head', array( $woocommerce, 'generator' ) );
}

add_action( 'woocommerce_init', 'my_woocommerce_loaded_function' );

Remove WooCommerce Generator Tag from previous versions

function my_woocommerce_loaded_function() {
 global $woocommerce;
 remove_action('wp_head', array($GLOBALS['woocommerce'],'generator'));
}

add_action( 'woocommerce_init', 'my_woocommerce_loaded_function' );

Change Autosave Interval in WordPress

If you are writing a long post, then autosave feature will save your posts regularly while you are writing them, it will make your blog database loaded, if you are a regular poster, it’s a good feature in wordpress, which let you to go back to the previous version of post if you lose power during writing or unexpectedly done changes which are not you wanted, so going back to the version which you think is the closest you are writing is good feature.

but over the days when posts getting coming to your wordpress, your database start loading with lot of posts revisions.. there are few plugins which will just clear your revisions on your will, but there is a way to control the time in which wordpress will save your post, you can adjust it according to your writing speed or on any other parameter you are feeling okay.

To change autosave interval in wordpress you need to edit wordpress core setting file i.e. wp-config.php.

add following line just before the comment “That’s all, stop editing! Happy blogging.”  in wp-config.php file.

define(‘AUTOSAVE_INTERVAL’,120);

note: time is in seconds.

how to change WordPress admin username

For security reasons, it is important. that default WordPress admin username to be changed. In the WordPress backend itself, there is no way to do this. This is easily performed in a MySQL admin program such as phpMyAdmin by following code:

UPDATE wp_users
SET user_login = 'newname'
WHERE
user_login = 'admin' ;

Please replace table prefix with your own if set to different then “wp_”.

How to Control Image Size in WordPress using CSS

It often happens that a picture is wider than the range is displayed in the Content. Especially if you have several authors who are not so experienced in WordPress.

In order to embed large images but to avoid destroying of the layout, simply add following lines of CSS in the styles.css file.

Control Image Size in WordPress using CSS

.Post area { img max-width: 400px; height: auto;}

How to Add Content Boxes to a Artisteer WordPress Theme

While working on many wordpress themes, powered by Artisteer, people asked me how to add content boxes to a Artisteer WordPress Theme.
There are many WordPress Plugins available, which enable you to add different color boxes to make your post content stand out. I have also seen many other premium wordpress themes using Shortcodes, which isn’t necessary for adding color boxes to make your core theme heavy loaded with lot code when it’s easily doable by using css and html code.

I hope Artisteer will enable one day for user’s to generate color content boxes in their software directly, but let’s see how easily we can implement it into Artisteer WordPress Theme by using few lines of html and adding CSS to our Theme Style Sheet.

contentboxesintoartisteerwordpresswebsite

Here is how we will write html code into our WordPress post/page editor, make sure you click HTML button on the right top of the editor to write the code in HTML tab.

Implementing the Content Boxes to a Artisteer WordPress Theme

bdn-box-green”>

This is Heading.

Your Content goes here… Lorem aest sodales vulputate. Suspendisse aliquam, ante convallis mattis luctus neque

Add CSS to your Artisteer Theme Style Sheet

Following CSS is used in one of my clients project to add colored Boxes, you should adjust it according to your needs to Add Content Boxes to your website requirements.

.bdn-box-green,
.bdn-box-grey,
.bdn-box-darkgrey,
.bdn-box-purple,
.bdn-box-pink,
.bdn-box-skyblue,
.bdn-box-naviblue,
.bdn-box-red,
.bdn-box-orange,
.bdn-box-brown
{
margin: 0 0 25px;
overflow: hidden;
padding: 20px;
}
.bdn-box-green h2,
.bdn-box-grey h2,
.bdn-box-purple h2,
.bdn-box-pink h2,
.bdn-box-skyblue h2,
.bdn-box-naviblue h2,
.bdn-box-red h2,
.bdn-box-orange h2,
.bdn-box-brown h2
{
color:#000;
font-size: 14px;
line-height: 1.4;
}

.bdn-box-darkgrey h2
{
color:#fff;
font-size: 14px;
line-height: 1.4;
}

.bdn-box-green {
background-color: #79ad27;
border: 1px solid #181f29;
color:#FFF;
}

.bdn-box-grey {
background-color:#d8d8d8;
border: 1px solid #181f29;
color:#000;
width:50%;
float:left;
margin-right:10px;

}

.bdn-box-darkgrey {
background-color:#373737;
border: 1px solid #d8d8d8;
color:#fff;
width:30%;
float:left;
margin-left:10px;
}

.bdn-box-purple {
background-color:#8e40bb;
border: 1px solid #181f29;
color:#FFF;
}

.bdn-box-pink {
background-color:#bf34a0;
border: 1px solid #181f29;
color:#FFF;
}

.bdn-box-skyblue {
background-color:#00b3f1;
border: 1px solid #181f29;
color:#000;
}

.bdn-box-naviblue {
background-color:#567ab3;
border: 1px solid #181f29;
color:#FFF;
}

.bdn-box-red {
background-color:#ae3d3e;
border: 1px solid #181f29;
color:#FFF;
}

.bdn-box-orange {
background-color:#ee8f4b;
border: 1px solid #181f29;
color:#FFF;
}

.bdn-box-brown {
background-color:#9f4801;
border: 1px solid #181f29;
color:#FFF;
}

So you see how easy it is to implement different Content boxes into your post, I hope you like the approach and show us how you implement it in your themes.