Subscribe to the RSS Feed
FreeWordpressThemes.us
Free WordPress Tutorials and Themes.

How to Switch Off a Website With One Line of Code

May 20th, 2014 by admin

Sometimes you may need to switch off a WordPress site without affecting data. If you are an aspiring developer, then sometimes you may want to remotely make a site disappear without actually destroying anything. This is where CSS comes in handy. In this article, I will show you how to switch off a website with one line of code.

There are two ways to do this, first method remotely loads a tiny CSS file into your site, which you can turn on from a remote URL. This method is particularly helpful for theme developers who are looking for a way to deal with non-paying clients.

The second method is to add the CSS yourself. This method is useful, when you just want to hide the style and appearance of a website.

Remotely Switching Off a Website

First thing you need to do is to visit CSS Kill Switch and create an account for your website by providing a site ID and password.

Add your site to CSS Kill Switch

Once you have added your site, CSS kill switch will show you two lines of code. You need to use either one of them, I would recommend using the @import line. Simply copy and paste it in your WordPress theme’s stylesheet.

Implementing CSS kill switch

Now to turn off your website, all you need to do is revisit CSS Kill Switch and sign in with your site’s ID and Password. Once you are logged in, simply check the Engage box to turn off the website.

Manually Switching Off a Website

What CSS Kill Switch does, can be done manually as well. Simply add this single line of code in your theme’s stylesheet:

body * { display: none !important; }

CSS Kill Switch also adds black as background color. If you are doing this manually and want to deceive someone into believing that there is something wrong with the website, then leaving it white will make people think they are facing the dreadful WordPress white screen of death error. It will take them sometime to figure out that there is nothing wrong with WordPress on their website.

Please note that by switching off the appearance of a website, you are not actually shutting down a website. The contents of the site will still be visible to search engines and text only browsers. Any user can still see the content by viewing the source code of the page. The CSS code is also easily detectable by clicking on Inspect Element any where on a web page.

I hope this article helped you learn how to switch off a website with just one line of code.

If you liked this article, then join ThemeLab on Twitter and Google+.

The post How to Switch Off a Website With One Line of Code appeared first on ThemeLab.

Written by - Visit Website

Posted in Theme Labs | No Comments »

How to Switch Off a Website With One Line of Code

May 20th, 2014 by admin

Sometimes you may need to switch off a WordPress site without affecting data. If you are an aspiring developer, then sometimes you may want to remotely make a site disappear without actually destroying anything. This is where CSS comes in handy. In this article, I will show you how to switch off a website with one line of code.

There are two ways to do this, first method remotely loads a tiny CSS file into your site, which you can turn on from a remote URL. This method is particularly helpful for theme developers who are looking for a way to deal with non-paying clients.

The second method is to add the CSS yourself. This method is useful, when you just want to hide the style and appearance of a website.

Remotely Switching Off a Website

First thing you need to do is to visit CSS Kill Switch and create an account for your website by providing a site ID and password.

Add your site to CSS Kill Switch

Once you have added your site, CSS kill switch will show you two lines of code. You need to use either one of them, I would recommend using the @import line. Simply copy and paste it in your WordPress theme’s stylesheet.

Implementing CSS kill switch

Now to turn off your website, all you need to do is revisit CSS Kill Switch and sign in with your site’s ID and Password. Once you are logged in, simply check the Engage box to turn off the website.

Manually Switching Off a Website

What CSS Kill Switch does, can be done manually as well. Simply add this single line of code in your theme’s stylesheet:

body * { display: none !important; }

CSS Kill Switch also adds black as background color. If you are doing this manually and want to deceive someone into believing that there is something wrong with the website, then leaving it white will make people think they are facing the dreadful WordPress white screen of death error. It will take them sometime to figure out that there is nothing wrong with WordPress on their website.

Please note that by switching off the appearance of a website, you are not actually shutting down a website. The contents of the site will still be visible to search engines and text only browsers. Any user can still see the content by viewing the source code of the page. The CSS code is also easily detectable by clicking on Inspect Element any where on a web page.

I hope this article helped you learn how to switch off a website with just one line of code.

If you liked this article, then join ThemeLab on Twitter and Google+.

The post How to Switch Off a Website With One Line of Code appeared first on ThemeLab.

Written by - Visit Website

Posted in Theme Labs | No Comments »

How to Switch Off a Website With One Line of Code

May 20th, 2014 by admin

Sometimes you may need to switch off a WordPress site without affecting data. If you are an aspiring developer, then sometimes you may want to remotely make a site disappear without actually destroying anything. This is where CSS comes in handy. In this article, I will show you how to switch off a website with one line of code.

There are two ways to do this, first method remotely loads a tiny CSS file into your site, which you can turn on from a remote URL. This method is particularly helpful for theme developers who are looking for a way to deal with non-paying clients.

The second method is to add the CSS yourself. This method is useful, when you just want to hide the style and appearance of a website.

Remotely Switching Off a Website

First thing you need to do is to visit CSS Kill Switch and create an account for your website by providing a site ID and password.

Add your site to CSS Kill Switch

Once you have added your site, CSS kill switch will show you two lines of code. You need to use either one of them, I would recommend using the @import line. Simply copy and paste it in your WordPress theme’s stylesheet.

Implementing CSS kill switch

Now to turn off your website, all you need to do is revisit CSS Kill Switch and sign in with your site’s ID and Password. Once you are logged in, simply check the Engage box to turn off the website.

Manually Switching Off a Website

What CSS Kill Switch does, can be done manually as well. Simply add this single line of code in your theme’s stylesheet:

body * { display: none !important; }

CSS Kill Switch also adds black as background color. If you are doing this manually and want to deceive someone into believing that there is something wrong with the website, then leaving it white will make people think they are facing the dreadful WordPress white screen of death error. It will take them sometime to figure out that there is nothing wrong with WordPress on their website.

Please note that by switching off the appearance of a website, you are not actually shutting down a website. The contents of the site will still be visible to search engines and text only browsers. Any user can still see the content by viewing the source code of the page. The CSS code is also easily detectable by clicking on Inspect Element any where on a web page.

I hope this article helped you learn how to switch off a website with just one line of code.

If you liked this article, then join ThemeLab on Twitter and Google+.

The post How to Switch Off a Website With One Line of Code appeared first on ThemeLab.

Written by - Visit Website

Posted in Theme Labs | No Comments »

How to Switch Off a Website With One Line of Code

May 20th, 2014 by admin

Sometimes you may need to switch off a WordPress site without affecting data. If you are an aspiring developer, then sometimes you may want to remotely make a site disappear without actually destroying anything. This is where CSS comes in handy. In this article, I will show you how to switch off a website with one line of code.

There are two ways to do this, first method remotely loads a tiny CSS file into your site, which you can turn on from a remote URL. This method is particularly helpful for theme developers who are looking for a way to deal with non-paying clients.

The second method is to add the CSS yourself. This method is useful, when you just want to hide the style and appearance of a website.

Remotely Switching Off a Website

First thing you need to do is to visit CSS Kill Switch and create an account for your website by providing a site ID and password.

Add your site to CSS Kill Switch

Once you have added your site, CSS kill switch will show you two lines of code. You need to use either one of them, I would recommend using the @import line. Simply copy and paste it in your WordPress theme’s stylesheet.

Implementing CSS kill switch

Now to turn off your website, all you need to do is revisit CSS Kill Switch and sign in with your site’s ID and Password. Once you are logged in, simply check the Engage box to turn off the website.

Manually Switching Off a Website

What CSS Kill Switch does, can be done manually as well. Simply add this single line of code in your theme’s stylesheet:

body * { display: none !important; }

CSS Kill Switch also adds black as background color. If you are doing this manually and want to deceive someone into believing that there is something wrong with the website, then leaving it white will make people think they are facing the dreadful WordPress white screen of death error. It will take them sometime to figure out that there is nothing wrong with WordPress on their website.

Please note that by switching off the appearance of a website, you are not actually shutting down a website. The contents of the site will still be visible to search engines and text only browsers. Any user can still see the content by viewing the source code of the page. The CSS code is also easily detectable by clicking on Inspect Element any where on a web page.

I hope this article helped you learn how to switch off a website with just one line of code.

If you liked this article, then join ThemeLab on Twitter and Google+.

The post How to Switch Off a Website With One Line of Code appeared first on ThemeLab.

Written by - Visit Website

Posted in Theme Labs | No Comments »

How to Highlight Author Comments in WordPress

May 19th, 2014 by admin

It becomes difficult for users to notice author’s comments on posts with many comments. This sometimes results into users asking same question in comments, even though the author has already answered in an earlier comment. This is why most popular blogs highlight author comments in WordPress. It is really simple, and in this article I am going to show you how to highlight author comments in WordPress.

Author comment highlighted

WordPress adds CSS classes to many elements in the HTML output it generates. These default CSS classes can be used or by themes or plugins. WordPress also adds a CSS class to comments added by a post’s author. This CSS class is .bypostauthor and you can see it by right clicking on your own comments for posts you have written.

bypostauthor class added to comments written by post's author in WordPress

Now all you have to do is to use this class to highlight author comments differently. Lets change the background color of author comments in WordPress. Add this CSS to your theme or child theme’s stylesheet.

.bypostauthor { 
background: #eee;
} 

Here is another example, this one just adds a border to highlight author’s comment:

.commentlist .bypostauthor {border-top: 10px solid #e18728;}
.commentlist li ul.children li.bypostauthor {border-top: 10px solid #e18728;}

The easiest and quickest way to learn how to modify themes is by studying other themes. Lets see how the default Twenty Twelve theme adds ‘Post Author’ label to highlight author comments in WordPress.

Twenty Twelve uses a function called twentytwelve_comment. Defined in the theme’s functions.php file, this function acts as the callback function for wp_list_comments() function. Adding a callback function to wp_list_comments allows themes to control the display of comments.

In Twenty Twelve’s functions file you find these lines which add the Post Author label to comments added by the post’s author:

printf( '<cite><b class="fn">%1$s</b> %2$s</cite>',
	get_comment_author_link(),
	// If current post author is also comment author, make it known visually.
	( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''
);

After adding the Post Author label, it styles the label using this CSS:

.bypostauthor cite span {
color: #fff;
background-color: #21759b;
background-image: none;
border: 1px solid #1f6f93;
border-radius: 2px;
box-shadow: none;
padding: 0;
}

We hope this article helped you highlight author comments in WordPress.

If you liked this article, then join ThemeLab on Twitter and Google+.

The post How to Highlight Author Comments in WordPress appeared first on ThemeLab.

Written by - Visit Website

Posted in Theme Labs | No Comments »