The right way to customize WordPress Themes!

You are not the only person who wants to customize your WordPress Theme. And there is no single way to tweak your site. There might be multiple ways to do the same thing. In this post we will discuss the right way to modify or customize WordPress theme.

What’s in the post?

Almost all Most commercial theme available outside the WordPress.org repository have inbuilt plugins and panel. They seem to be easiest way to customize your WP themes. But wait, there is a catch! They might not be the best option available. Or more precisely, they might be a theme lock. Let’s first take a look on the options we have.

You might hire a developer to do things with your site. But it might not be feasible with everyone or just not that complex to ping a developer. So if you are going to customize your theme then it’s better to understand the basics and the right way to do that.

Let’s first talk about the sexiest feature of your theme, the panel. In most premium commercial theme you will get one.

Theme Panel

This is an inbuilt feature of most premium theme. But sometimes you might get a panel as add-on plugin. These panels offer you a verity of customizations.

Significance of using inbuilt panel

  1. Easiest way to customize.
  2. No need to be a professional or even intermediate user. Everybody can work with it.
  3. Use plenty of options to tweak your theme and give it a new look.

Limitations:

  1. Possible Theme lock
  2. Limited functionality

Using a plugin

You might use a plugin, more precisely custom plugin, to customize your theme. You may literally do many things with your plugin.

Benefits of using a plugin to customize WordPress Themes:

  1. A plugin will definitely be helpful and give you more flexibility to customize your site
  2. It can work across your sites under multi-site WordPress install.
  3. No theme lock. Your customizations will be safe even after switching your theme.

Limitations:

  1. You should be aware of PHP/HTML/CSS or sometimes MySQL.
  2. Potentially break your site if you follow some random tutorials or hit and try with your live site.
  3. You will be responsible for what you are doing and sometimes it will be costlier if you damage your site and do not know how to recover it.

Indeed this is sometimes riskier to use a plugin or child theme but it is most recommended way to try these methods.

You may ask for help any time on WordPress Forums, Stack overflow, your theme support. If everything fails try some paid options like Theme Hybrid Club or even here in our forums. These will not be a guaranteed option but they provide pretty good support and put you in right direction.

Using a child theme for customizations:

This is the most precise option and literally all theme developers recommend this option for advance customization. Here are a few benefits and limitations of Child Themes:

Benefits of a child theme:

  1. Everybody recommends this.
  2. Good for advance theme customization
  3. Will keep your design intact even after parent theme updating.

Child Theme limitations:

  1. Basic knowledge of PHP/HTML/CSS will be required
  2. You might break your site if editing on live site.
  3. Support will be limited in many cases.

Deciding between Child Theme and Custom Plugin

Now you have seen all these options have their own good and bad. You might be confused now. Isn’t it? It’s time to crystal clear the ideas when should one use a plugin and when should a child theme.

  1. Decide whether your customization is a feature or design! If it is a feature go for custom plugin else a child theme. You could easily distinguish between a theme feature and plugin feature; just think about changing the theme in future if you don’t want to keep those elements with your next theme it would be better to add such customizations to a child theme. [This idea is for layman or absolute beginners. If you know WordPress a little bit you might like to check this link.]
  2. Features like Custom Post types, gallery, and portfolio belong to plugin territory. You should not use such feature unless you can port them out. Your theme developer who built the theme will tell you how to do that.
  3. According to Official WordPress theme makers’ documents favicons, advertising widgets, analytics are also a plugin feature and should belong to plugin.

When to use your Theme Panel?

Theme panels are very useful if you use it properly. Unfortunately, Theme developers occasionally violate certain rules and add plugin features to the theme panel. This is a theme lock (or trap). If you use these features you probably want to use their theme for your life. Never use such inbuilt feature unless there is an option port your data out.

The most common example of such feature is product rating.

It will be initially costlier to setup multiple plugin in terms of time and money. But it might be best option. Most popular plugins are well supported in (and outside) WordPress repository. Choose them.

I know many people would not support this idea but in long run it will be useful. If you have different opinions please do share.

Statutory Warning: Editing WordPress Theme may break your site!

How many smokers know “Cigarette smoking is injurious to health”? And, how many of them quit smoking after reading the quote. There might be a few but not in significant number. There is a similar situation here. People start editing themes and plugins on a live site and sometimes they mess things up and blame WordPress or luck. It is highly recommended to edit/test themes or plugins on test server or site. Do not edit a live theme. It may potentially break your WordPress installation. For the sake of goodness, please follow the following rules.

  1. Always edit themes or plugin on a test server or site.
  2. Do not hack WordPress core.
  3. Always debug edited theme or plugin before uploading to live website.
  4. Test compatibility with other plugins you already have installed on your site.
  5. Always backup your site before activating your plugin or theme.

If you follow these rules you probably enjoy your blogging life.

Getting started with WordPress Theme customizations

Once you understand be theme territory and plugin territory you will easily get started with customizing your site. You should also aware about theme panel features and theme trap.

Customize WordPress Theme using a plugin

A custom plugin will give you enormous power to hack many things you may download this sample plugin and get started with adding codes to it. Forking the plugin on Github will be better if you have some spare time and want to track every change made. I will discuss how to do that someday.

Here are a few lines of code every plugin should have. As you see these lines give you, and WordPress, an idea about theme name, author name and URL, version and some other information.

You may edit/test and then upload the plugin to your site for safe customizations. Depending upon your theme there might be limitations to modify your theme. But hey, we may use child theme for editing and adding templates.

Customize WordPress theme using a child theme

Child theme is the best possible way to customize your theme. As the name suggest child theme needs a parent theme to work. Yes, the relation is also called parent-child theme. You may also have a grandchild theme. But it will be discussed later.

Like plugins a child theme also need some essential files and some codes to get started. I have created a sample child theme for Twenty Twelve, which you could use to understand the mechanism of the child theme.

Apart from the general information notice the 7th line template: twentytwelve. This line is required to define the parent theme. The word twentytwelveshould be your real theme slug. This is case sensitive.

Read official doc more about creating a child theme.

How to make WordPress Print Friendly

Offering print friendly version of blog posts not only gives an extra feature but also helps your user to keep their loved article. By default, no WordPress theme offers such feature. This is due to conflicts with plugin and customizations. There is some 3rd party service which offers good features but that could not be solution for many.

Print Friendly WordPress with small plugin we build will do some simple magic. When user will hit Ctrl+P or any other way to take print the browser will automatically hide all unnecessary elements from prints and print previews e.g. header, sidebars, widgets and footers.

In this post we will add this cool feature to a Genesis Framework based site and a Standard WordPress theme i.e. Twenty Fourteen. Once you understand the approach you will able to customize it for any WordPress site. This will be fun for beginners and I am already here to help you.

Prerequisite: Basic knowledge of html and CSS is required.

What will we need?

We will need three things and I am pretty sure you already have first two.

  1. Google Chrome or Mozilla Firefox. Firebug extension could also be used if you are familiar with it.
  2. File compressor software like WinZip, WinRAR or anything which compress our files to zip.
  3. The starter plugin we have made. Download the zip file or fork it on GitHub.

Note: The plugin is not available on WordPress.org.

Let’s begin with some coding

Hey, I know you might not a web developer. But it will be easy and fun.

Uncompressed the starter plugin you just downloaded and un-compress it. The all we need to edit print.css. By default I have added some basic codes which work with Genesis Theme, Twenty Fourteen and many other untested themes.

While editing the file our goal will be to remove all elements which we don’t want to print. That should be sidebars, footer widgets, footer and sometimes header. Post Meta like author info, comment counts, category and tags also have no meaning for prints.

How to find html elements?

Use Ctrl+Shift+I on Chrome or Firefox to activate Developer Tools pane. After that find the element by hovering the code will highlight the element you have to find.

If you are not familiar with Chrome or Firefox extension tools read this articles:

How to edit print stylesheet?

To hide some element use display: none;

Suppose we want to hide header and footer div. If the div id is #header and for footer #footer the code will be something like:

#header,
#footer {
    display: none;
 }

If the header id is #site-header then you should use #site-header instead of #header.

Further, we might like adjust width and margin for paragraphs, quotes, list styles, tables. I have already added some codes for that which should work fine.

The important thing you should consider editing is line 168. You should change the URL to your site and any disclaimer or notice you want to add.

Important: The print.css file will highly depend upon your site structure and theme/plugins. This will be your home work to identify all the unwanted elements, divs and spans.

Tips: You should also use !important with your CSS.

Compress and upload

Once you are sure that you have made all necessary changes to the CSS file then you should save the file and zip the folder using any compressor. Here you should keep the file structure same as you have downloaded.

Now upload the plugin to your WordPress site and activate it.

Tip: You may also upload the sample plugin I made and then customize the css file using WordPress built-in plugin editor page. The choice is yours.

If you have any problem please consider leaving a comment below or tweet to @BlogSynthesis.

How to Create Google Chrome App in Less Than 5 Minutes

With Google Chrome, a lot of things are very easy to do. One of them is creating your own app. Yes, we can create an app in less than 5 minutes. (Considering an image icon of 128×128 px is ready to use).

Prerequisites:

  • A credit card for $5 setup fee (Google will charge it for first time).
  • Google Chrome.
  • Your site or blog is added and verified to Google Webmaster Tools
  • App icon with 128x128px in dimension.
  • Screenshot of your site in 1280x800px or 640x400px
  • App image of 440x280px
  • Google Analytics ID (UA-XXXXXX-YY) (Optional)

Google Chrome App Creation:

Create a manifest.json file

Open a text editor (like Windows Notepad) and write the following code and make necessary changes:

{
	 "name": "NetRival - Technology Blog",
	 "short_name": "NetRival",
	 "description": "NetRival is a Blog Focused on Personal Technology, How-to Tutorials, Gadgets and Telecom",
	 "version": "0.1",
	 "manifest_version": 2,
	 "icons": {
		 "128": "icon_128.png"
		 },
		 "app": {
		 "urls": [
			 "http://www.netrival.com/#utm_source=google_chrome&utm_medium=chrome_app&utm_campaign=google_chrome_app"
			 ],
		 "launch": {
			 "web_url": "http://www.netrival.com/#utm_source=google_chrome&utm_medium=chrome_app&utm_campaign=google_chrome_app"
			 }
		 }
 }

Change name, short_name (upto 12 characters), add some description and the urls. Now rename your image as icon_128.png. Create a new directory and place both manifest.json and the icon in it. Now using any compression tool zip the directory.  (We will need this zipped this file later)

Load the created app in Google Chrome:

Open chrome browser and visit chrome://extensions/ then make sure the checkbox named “Developer mode” is checked. You will find it on the top-right of the page (as shown in the image below).

Now “Load unpacked extension” by browsing the directory. Note: Here we don’t have to load a file. Just browsing the directory where the icon and the manifest.json file stored. Google Chrome will automatically load the manifest.json file from that directory. as shown below. In my case the directory was E:\NetRival_Chrome_App (See the highlighted area of the screenshot)

temp-chrome-app

Verify the newly created Chrome Extension:

The plugin should now work. To verify it visit chrome://apps/ (See the screenshot below. If you will click on it. It will open your site or blog.)

verify-check-app

Submit Google Chrome Extension to Official directory.

We will now submit the app to Google Chrome Store so anybody in the world can download it. We have to upload the manifest.json and png in a zipped file (as we have compressed earlier). But first of all we have to pay $5 registration charge to access Google Chrome Developer console. (This $5 charge will allow you submit up to 20 chrome apps and extensions, excluding themes)

Visit https://chrome.google.com/webstore/developer/dashboard and pay the $5 fee. After successful payment hit “Add New Item” and upload the zipped file.

After uploading we have fill some details and add screenshots. You may take the following image as example. Here the screenshots and other images must be in the size mentioned.

chrome-dev-dashboard

 

You may use Google Analytics to track traffic to the Chrome App in the store. Just fill the id and its done for preview. Here, It is recommended to use different GA id than your blog. Now hit “Preview” button at the bottom-right and test-drive how your app looks in Google Chrome Store. Once you are satisfied hit publish button, and you are done.

These demo link and readymade zipped file link will help you. Go ahead and create a Google Chrome app in just minutes. Good Luck!

Demo: https://bitly.com/NetRivalChromeApp
Demo Files: Download Here

How to Transfer YouTube Channel to another Google Account in 4 easy steps.

transfer-youtube-channel
Transferring a YouTube channel was not possible after 2009. But now we can easily transfer YouTube channel to another Google Account. This is now possible with a new Google+ Page and YouTube feature. Now in a Google account we can have more than one account and a Google+ page can have multiple Managers. And this trick is based on the combination of these two features.

Yet, Transferring YouTube account is not official but yes we can do this. It’s a great news for users having multiple YouTube channels. Now they will not have to maintain multiple Google Accounts just for YouTube channel or any specific Google Products.

Lets get started and discuss how to transfer a YouTube channel to another account or even change the ownership of a YouTube Channel.

Transfer YouTube Channel to another Google Account

Step 1: Go to YouTube Advanced Setting page of your Channel (which you want to transfer). Here you will find a new button titled “Connect with a Google+ Page”. Click on the button. A new window will appear asking to keep username or choose a better one.

Choose the first option to “keep your username”, accept the terms and condition and click “next”. Don’t worry if you get an error page but check if a new Google+ page has been created.

Step 2:  Now go to the newly created Google Plus page and Add a new Manager. Invite a manager by sending email. (This user will be your new YouTube channel owner at the end of the tutorial)

Step 3: At this step you or the new manager will need to verify his email id and accept invitation to be a manager. Just check email and click on “Be a Manager” button.

Step 4: Now go to Google plus page and change the privilege from “Manager” to “Owner”. You will find this page on “Managers” Tab. Also, there might be a 2 week wait time to complete the step four. If you find such message then come after 14 days and transfer the ownership of the YouTube channel.

Tested on NetRival YouTube channel. At that time there was no 14 days wait time. After a few hours when I tried to move BlogSynthesis youtube channel, it was there.

Additional tips after transferring YouTube channel:

1. If you transfer the ownership then the old Google Account user will become a manager at YouTube and the Google+ page. To completely remove accessing youtube dashboard remove ask the new owner (or yourself) to remove old account from manager. If you will do so, Old account will be completely removed from the youtube channel.

2. If you already have a Google Plus page, then youtube channel can be transferred in reverse order of the tutorial. i.e.

  • Go to Google+ settings page and invite a manager (YouTube account holder email).
  • After accepting invitation the youtube account holder will be able to link YouTube channel and Google+ page.
  • After successful linking remove the manager from Google+ Page. (Following this reverse tutorial I transferred BlogSynthesis YouTube channel)

3. Be careful while inviting a manager to Google+ page.

If you got any problem then leave a comment here or on video tutorial at youtube. Don’t forget to share on twitter,Google+ or Facebook. if you liked the tutorial.

Alternate way:

There is a possibility to some changes in the process as many of you have reported on the video comment or here on the blog. Well, as i said earlier, Google do not allow to transfer youtube channel officially but there is a loophole. That’s why the above guide and video worked. Due to the changes it might be possible that the above guide is not working for you.

However there is an alternate way to transfer the youtube channel: If you are forced to create a Google+ page with your youtube account. Then go ahead and create one. (For some people Google has already created one.) After sometime (or instantly) you will be able to add a manager or administrator to the Google+ page. Don’t forget here we are talking about the page, not the channel.

Also, Many people asked me about the video, subscribers and stats? Will everything be lost? The answer is “NO”. There will be no changes in your videos, stats or subscriber. I will be completely safe with the youtube channel.

And yes, This trick will work until Google patches the hole. So it will be better to hurry.

How to setup Microsoft Outlook custom domain for free email hosting?

If you are looking for a custom domain email on a reliable host for free, then Microsoft Outlook is the best free solution. Microsoft Outlook custom domain allow 50 accounts/domain for your personal or small business use. If you need more than 50 accounts per domain then you will have to signup Office 365, which is quite costly at the moment. If you want to be email provider then Microsoft Outlook for custom domain is also best choice. You may do this without spending a single penny.

IMPORTANT: Microsoft has stopped new signup for free email hosting. If you are looking for another free alternative then Zoho Mail could be an option. It offers 20 free email accounts. Check top 6 free and paid email hosting solutions. For those who already have a free account, should create as much as account they need in future. Since you will no longer be able create new accounts in near future.

Outlook.com no longer offers support for new custom domain sign ups. New customers looking to manage custom domains are encouraged to use Office 365, Microsoft’s premium online service, which also includes enterprise-class mail, collaboration and communication tools.

Thanks to “Raja” for reporting us.

Recently, Google has stopped offering Google Apps for free. They charges are pretty high for any type of organizations. Well, I will not compare between the two services in the topic, but just helping you to configure Microsoft Outlook custom domain for free email. But first discuss about the features what Microsoft offers for free.

  • Email hosting
  • Maps
  • Profiles
  • Photos
  • SkyDrive
  • Groups
  • Calender.

All services are free and can be offered from a custom domain or sub-domain.

Setup Microsoft Outlook custom domain for email hosting:

Step 1:

Go to https://domains.live.com/Signup/SignupDomain.aspx. Fill the domain name in the box. If you don’t have any domain and want to purchase then you may buy from any Microsoft partners or buy from GoDaddy, Name.com or Dreamhost are best in the segment.

outlook-custom-domain1

Don’t forget to check “Set up Outlook.com for my domain” in “Choose mail service for your domain” on the same page [As shown in the image above]. You may also change this setting later, but who want to do that!  Now click “Continue”.

Step 2:

In the next step, you will be ask to setup domain administrator. [A domain administrator will be responsible for all activity in the Outlook custom domain account]. I will recommend you to use an existing account or account from outside the custom domain. Check “Sign in with an existing Microsoft account” and hit continue to login existing account. You may also sign up for a new outlook.com account if you don’t have any.

outlook-custom-domain2

After logging in to account Microsoft will ask you to review the settings and accept agreement just hit “I Accept” after review it.

outlook-custom-domain-agg

Step 3: Verifying domain and set up MX record

To verify domain name you will need to goto your domain registrar and add some records.

Add a txt record which will be in v=msv1 t=example, and

MX record which will be in “example.msv1.invalid”. Note the “example” part will be same.

You may refer to your domain registrar help topics for any help in configuring TXT and MX record. Now you will have to wait for sometime, until DNS is propagating across the globe. It may take from few seconds to 48 hrs. After some time hit “Refresh” button in the yellow alert box. When your domain got verified the domain will be ready to use and you may create your first free custom email on outlook.com platform.

outlook-custom-domain-verification

Once the domain got verified you will see a green indicator and active status in the domain dashboard of your account. [As shown in the image below]

outlook-custom-domain-dashboard

Step 4: Create an email id with custom domain

Once your account is verified and active you may navigate to dashboard and click on the domain under which you want to create email/account. Their will be a form asking to fill some info. Just fill those and create your first email id with custom domain. the important thing is “Account name” in the form. it will be the email id and may have alphanumeric, periods, hyphens and underscore.

outlook-custom-domain-create-email

After creating the account you may ask user to login and accept terms and conditions. Also their will be an account reset question for your users, which will be asked at first login.

Benefits of Microsoft Outlook custom domain over Google Apps!

  1. Microsoft offers these apps for free.
  2. Up to 500 users 50 may be added just after signing up. (Now, you can’t get more than 50 accounts per domain)
  3. You may also offer your site visitors to sign up email ids with under your domain.
  4. Outlook.com offers unlimited storage. So, you will never required to delete mail.
  5. You may also offer maps, skydrive and other services from your domain/sub-domain

If you have any query or problem let me know by commenting below. Don’t forget to share this post on Google+, Twitter or Facebook, if you liked it.

Quick Tip: If you are now able to receive emails to your newly set up email accounts then make sure that there is no other MX records pointing to @ or the naked domain.

I have recently got a chance to log into someone else’s account and fix the issue. I successfully fixed the issue. It was the wrongly configured.

Please ask all types of Domain Setup, Web Hosting Setup and WordPress related questions to our forums

How to add “Google Tag Manager” to WordPress sites?

Google offers premium services to Webmasters and Bloggers for free like Google Analytics and Google Feedburner. Recently, Google has launched another revolutionary service called “Google Tag Manager” It will boost the page rendering time and increase Page-Speed score.

In the tutorial, we will discuss how to add Google Tag Manager to WordPress. But First of all thank for landing on BlogSynthesis.com. I hope you will have some nice time here.

Now come to the point and add the Google Tag manager to WordPress. I assumed that you have already have the GTM (Google Tag Manager) script. In this scenario We will play with the code.

How to add Google Tag Manager to Genesis Framework (on any child theme).

To add the script we will have to edit functions.php file of the child theme on Genesis Framework. But first of all we should have a backup of the file. Using a FTP client, like Filezilla, download the unedited function.php file from:

<WP DIR>/wp-content/themes/<CHILD THEME DIR>/functions.php

Now, Add the following code to your functions.php and save/upload.

/**
 * Add Add Google Tag Manager script on Genesis Framework
 *
 * @author Anand Kumar
 * @link http://www.blogsynthesis.com/add-google-tag-manager-to-wordpress/#genesis-framework
 *
 */

add_action('genesis_before', 'google_tag_manager');
function google_tag_manager() { ?>
<!-- Google Tag Manager -->
PASTE GOOGLE CODE MANAGER CODE HERE
<!-- End Google Tag Manager -->
<?php
}

How to add Google Tag Manager to Thesis Theme Framework v 1.8.x.

If you are a Thesis Theme user then add the following code to your custom_functions.php file.

/**
 * Add Add Google Tag Manager script on Thesis Theme Framework
 *
 * @author Anand Kumar
 * @link http://www.blogsynthesis.com/add-google-tag-manager-to-wordpress/#thesis-theme-framework
 *
 */

function limit_front_page() {
global $query_string;
?>
<!-- Google Tag Manager -->
PASTE GOOGLE CODE MANAGER CODE HERE
<!-- End Google Tag Manager -->
<?php
}
add_action('thesis_hook_before_html', 'limit_front_page');

To add the above code to Thesis 1.x you should navigate to “Thesis >> Custom file editor >> custom_functions.php (from drop-down menu)”

How to add Google Tag manager to any other theme by editing Theme file

To add Google Tag manager on other themes simply navigate to edit header.php and find the opening body tag. As shown in the screenshot below.

header.php twenty eleven theme

Add the code in a line after <body> as pointed in the image with red arrow.

To add the above code you should navigate to “Appearance >> Editor >> Template (on the right side) >> Header (header.php) ”

[Please understand this may vary from theme to theme. If you are facing any problem in adding to your blog. You may leave a comment below]

Don’t forget to have a keep a backup of original files. Failing to implement the code improperly will cause the broken theme or site.