Archive for August, 2014

How to Add Author Box in WordPress Post Without Plugin

Saturday, August 30th, 2014

Adding a small author box in WordPress post is becoming one of the biggest trends in WordPress powered blogs. Today almost every websites including many popular websites, use author bio box on each article.

So today I am going to show you, how you can add an author box in WordPress post at the end of the post content, without using any plugins. Using a plugin for each and every simple task is not a good idea if you care about your website performance. I do not recommend using plugins for small tasks on WordPress.

Previously I have explained some other tweaks to do some useful things on WordPress without adding any plugins. You can check some of them below.

  • Export WordPress Comments to Excel Sheet Without Plugin
  • How to Display Related Posts Without Plugin in WordPress
  • Insert Ads Inside Post Content Without WordPress Plugin
  • 301 Redirect All 404 Pages in WordPress Without Plugin

To add a author box in WordPress post, all you have to is to add some lines of code to your theme’s single.php and style.css files.  Below is the sample of author box that is used in my blog. You can see that under this post also.

Just open your theme’s single.php file using any of text editor. This file can be found inside your current theme folder (wp-content/themes/theme-name/single.php). If you check that file you can see a loop that shows the content of a single post. It may be using something like <?php the_content(); ?>. Just copy and paste following code where you want to show the author box. Typically it can be after the post content. Normally every blogger used to add author box in WordPress post after the content.

<div id="authorarea">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 70 ); ?>
<h3>About <?php echo get_the_author(); ?></h3>
<div class="authorinfo">
<?php the_author_meta( 'description' ); ?>
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">View posts by <?php echo get_the_author(); ?> <span class="meta-nav">&rarr;</span></a>
</div>
</div>

Now we have successfully added the author box in WordPress post. But we need to add some styles to the author box. Copy and paste following style to your theme style.css file.

Note : You should may make changes in this code according to your theme look.

#authorarea{
background: #f0f0f0;
border: 1px solid #d2d2d2;
padding: 10px;
width:500px;
overflow:hidden;
color: #333;
}
#authorarea h3{
font-size: 18px;
color:#333;
margin:0;
padding:10px 10px 5px 10px;
}
#authorarea h3 a{
text-decoration:none;
color: #333;
font-weight: bold;
}
#authorarea img{
margin:0;
padding:10px;
float:left;
border: 1px solid #ddd;
width: 100px;
height: 100px;
}
#authorarea p{
color:#333;
margin:0;
padding:0px 10px 10px 10px;
}
#authorarea p a{
color:#333;
}
.authorinfo{
padding-left:120px;
} 

Now save both files. Just open one posts and go to the position where you added the author box. You will see a cool basic author box with author image.

As you can see in code, we have used Gravatar image to show the author profile image. Check Gravatar website to know more about adding images to use inside your WordPress website.

Feel free to ask your doubts using comments or contact form. I am happy to help you.

The Story Behind Ai Wei wei

Saturday, August 30th, 2014
ai wei wei

The Story Behind Ai Wei wei

Born in Beijing, China in 1957, Ai Wei Wei has long been considered one of the most poignant provocateurs of the Chinese authorities. As an outspoken human rights activist, it should come as no surprise that Ai has had run-ins with the Chinese authorities before.

What gives Ai Wei Wei his power?

One of the reasons that Ai has become such a prominent figure is because of China’s own rise to prominence. Scheduled to become the dominant economic force on the planet, it should come as no surprise that the Western world would embrace an artist that is able to highlight some of China’s missteps.

 

When it comes to highlighting those missteps, Ai is perfect for that role. He knows how to combine art and life into a politically charged and daring performance that helps shape the way that we see modern China.

 

Because he spent his formative years as an artist in New York in the 1980s, Ai has been exposed to the likes of Andy Warhol, whose performance and conceptual art dominated the New York scene. Ai uses any range or medium to deliver his powerful message, ranging from blogs, to tweets, to architecture, performance, photography, or sculptures.

A return to China – no fear

Once China allowed its citizens to travel abroad in the 1980s, Ai made sure to do so. It was not until 1995 that Ai returned to China, his father was sick and was bound to a wheelchair. However, few people know that it was a request made by his father that actually kept Ai in China far longer than he would have otherwise expected.

 

Wei wei explains that one of his father’s last requests was that he consider China his home. Keep in mind that he did not mean this to signify reverence, but rather meant that Ai should feel comfortable in China, that he should do whatever he liked. The implication was that he should spend his time in his native land without any apprehension or fear.

His arrest

Ai was arrested at Beijing Capital International Airport on 3 April 2011. He was scheduled to catch a flight to Hong Kong that day. Chinese officials searched his studio facilities. Aside from arresting Ai, the police also detained Ai’s wife, Lu Qing, and eight staff members. The original explanation was that “his departure procedures were incomplete.”

 

Despite the fact that he was kept locked up without trial for more than 80 days,, he continues to use his artwork and the Internet to protest against the Chinese government. According to Ai, he continues to suffer from police harassment, claiming that the government wants to silence him.

“The art world’s most powerful figure”

The editors of ArtReview magazine named Chinese dissident Ai Weiwei the most powerful artist in the world in 2011. As was to be expected, the Chinese authorities were not pleased with this selection. They cited a “political bias” that ran contrary to the principles of the magazine. However, the editor of ArtReview argued that the choice was certainly not politicized.

His name is blocked across Sina Weibo

Sina Weibo is the largest Chinese social media site. Any kind of dissidence or subversion is regarded as a crime against the state because of China’s massive censorship practices. Because of that, it is impossible to search Sina Weibo for the search term “Ai Wei wei.” Because of this, commenters will often use different combinations such as Ai W Wei or aiww to propagate their discussions and subvert the Chinese firewalls.

He does not care about the value of his work

According to those around him, he is not the greatest businessperson when it comes to selling his work. Those around him suggest that he uses every cent of what he earns and pours it back into his work. He has personally expressed a disinterest in the market value of his work. He suggested that it was “absurd” to give a price to an artwork.

 

He suggested instead that prices of art were solely related to the market, not indicative of anything. He has come out and said that art cannot be measured by certain numbers or by money. In fact, he believes that a good artist should not be concerned with how much his actual work is selling for.

Suing the Chinese government

Aside from constantly providing reminders to the Chinese government that he is not going anywhere, Ai is also actively engaging the government in a legal sense. He is suing the Chinese government because of a case relating to allegations that his company, Beijing Fake Cultural Development, evaded taxes. Ai stated that some of the actions taken by the Chinese government were illegal and violated regulations.

 

One thing is certain, Ai Wei Wei continues to show the Chinese government that silencing someone who refuses to be silenced is not going to be easy.

 

If you enjoyed this article on Ai Wei Wei, you may also like this article on Issues With Beijing Air Quality

[relatedYouTubeVideos relation=”title” max=”2″ class=”horizontal center bg-black”]

China’s Melamine Baby-Milk Scandal

Saturday, August 30th, 2014
Chinas melamine milk scandal

Unwrapping China’s Baby-Milk Melamine Scandal

Whether you have younger children yourself or not, chances are you have heard about China’s 2008 melamine milk scandal. It showed the other side of the drastic economic growth that China was experiencing, and showed that inadequate oversight and institutionalized corruption during times of rapid growth could extract a high price.

This led to at least a dozen countries, primarily in Asia and Africa, banning the import of Chinese dairy products. This went beyond just milk but also included yogurt, ice cream, baby formula, and powdered milk. New Zealand warned that certain products manufactured in China needed to be avoided altogether and international supermarket giant Tesco pulled ice cream products from their shelves.

What is melamine exactly?

The primary pollutant found in the milk was melamine. This is a nitrogen-based compound for use in industrial and commercial plastics, think Formica countertops, flooring, whiteboard wall paneling, laminates, and eating utensils. According to research from the U.S. Food and Drug Administration, it is also used throughout Asia as a fertilizer.

 

An estimated 8,500 cats and dogs died because of kidney failure after eating food that was laced with melamine. When ingesting large amounts of the chemical, it leads to kidney failure and the formation of kidney stones.

Why is it used?

When Chinese food companies use melamine in wheat flour and similar products, it makes the products appear “denser” and gives the notion of extra protein. Because proteins are typically the only source of nitrogen in food, testing for that specific element usually shows relative protein concentrations. By adding melamine, it makes the food appear to have higher protein levels than it actually contains.

 

The reason behind the use of melamine is simple – economics. It would be possible to produce a food low in protein and make it appear as though it has a higher protein content. This means that it would be possible to market the product at a far higher price.

 

What does melamine do to the body?

What happens when we ingest melamine? Even though it is not considered a ‘highly toxic compound’, it can lead to kidney stones and kidney failure, especially in smaller animals and yes, babies as well. The reason that melamine becomes dangerous is because it forms crystals in the body that are not fully dissolved in urine. After gathering in the kidney, it ‘clutters’ the organ and begins with the formation of kidney stones. Those pets and babies that died did so because of acute kidney failure.

 

The case of Sanlu
The melamine milk scandal ultimately led to the second biggest dairy producer in the world collapsing altogether – Sanlu had been one of China’s most-trusted brands for over a decade. When there was a high-profile government investigation into the contamination, it was found that the top Sanlu officials already knew about the milk contamination and its health effects. In fact, they had known since late 2007. Even though consumers were complaining about the issues, Sanlu took no steps to improve its product or highlight the issue.

 

Instead, Sanlu tried to keep consumers quiet by investing heavily. They signed an agreement with China’s biggest search engine – Baidu.com. The advertising deal came with one condition, any negative news about the company had to be removed from the search results. Even though they knew about the dangers late 2007, the company continued selling an effectively toxic product until as late as September 2008.

Government involvement in the melamine scandal

It turns out that the scandal itself was not limited to Sanlu. In fact, further inspections revealed that 21 other Chinese producers had melamine in their milk products. This meant that one in five was contaminated. According to the head of China’s food quality watchdog, the reason that no one tested for melamine was that there was never any assumption that it would be added at all.

 

When it comes to the development and proliferation of the melamine contamination, the Chinese government itself played a critical and direct role. China’s top safety body previously awarded Sanlu the national inspection exemption label. This label was given to Chinese companies with a reputation for quality and large market share. Effectively, it meant that policing the quality of its own products was up to the company itself.

 

At the same time, officials on both the national and local level either actively or passively worked to cover up the growing scale of the crisis. Between the SARS virus not too long ago and the Olympic Games, the government actively tried to protect its political image, thus placing deliberate restrictions on media coverage of the melamine contamination.

 

Just as with the SARS virus, the government’s decision to attempt to ‘save face’ ultimately made the situation far worse. This silence led to more infections and ultimately more deaths than would have normally occurred. This leads to many people wondering, if there were another issue with Chinese products, would the government come forward and readily admit it, or would that lead to another attempted cover-up?

 

If you enjoyed this article on the melamine scandal, you may also like This article on the bad air quality in Beijing

So what is your view on the Chinese melamine milk powder scandal?