Using conditional data: post.author

You may have a blog with multiple authors and you want to give them the perfect google income according to their respective articles. This post is helpful to you to distribute your writers the google revenue.

The use of conditional tag to data: post.author allows several uses for blogs with a team of writers. In this article we look at some examples of what can be done. It is important to note that these hacks the author’s name must be exactly the same spelling as contained in the profile display name of the author, for example, by placing my name is necessary to write Krish , starting with “K” in capital letters, the letter “ish” in lowercase. If I write KRISH or krish, the hack does not work. It is also important that you stay tuned to the closing of tags b:if that should always match the number of “b:if” you open.

 

1) Link the name of the author of the post description page or “About” (About me)
Some blogs have team pages describing each author. For the reader knows the author of the best post, you can put your name in a link that points to this page. Or the administrator can use these links to direct the Twitter page of the author of the post, or an individual’s blog. To do this, locate the code author of the post (below the line of the post title or footer):

< span class = ‘post-author vcard’ >
< b: if cond = ‘data: top.showAuthor’ >
< Date: top.authorLabel />
< span class = ‘fn’ > < data: post.author />

Add the conditional, as in the example below:

< span class = ‘post-author vcard ” > 
< b: if cond = ‘data: top.showAuthor ” > 
< Date: top.authorLabel /> 
< span class = ‘fn’ > 
< b: if cond = ‘data: post.author == “AUTHOR-1′” > 
< a href = ‘ http://ENDERE -CO-OF-THE-AUTHOR PAGE-1 ‘ > NAME OF AUTHOR 1 </ a > 
< b: else /> 
< b: if cond = ‘data: post.author == “AUTHOR-2′” >
< a href = ‘ http://ENDERE CO-OF-THE-PAGE-AUTHOR-2 ‘ > NAME OF THE AUTHOR 2 </ a >
< b: else /> 
< b: if cond = ‘data: post.author == “AUTHOR-3′” >
< a href = ‘ http://ENDERE -CO-OF-THE-AUTHOR PAGE-3 ‘ > 3 AUTHOR’S NAME </ a > 
< b: else /> 
< b: if cond = ‘data: post.author == “AUTHOR-4″ ” > 
< a href = ‘ http://ENDERE CO-OF-THE-PAGE-AUTHOR-4 ‘ > 4 AUTHOR’S NAME </ a > 
< b: else /> 
< Date: post.author /> <! – Administrator for posts —> 
> </ b: if > </ b: if > </ b: if > </ b: if > 
</ span > 
</ b: if > 
</ span > 
 
 
 

2) Placing an “avatar” with information about the author of the post in the Post Footer
The reasoning is similar, but you should create some classin order to apply styles to the “avatar”. Consider the example:


< div class = ‘post-footer ” > < font > </ font >
< div class = ‘post-footer-line post-footer-line-1 ” >
< b: if cond = ‘data: post.author == “AUTHOR-1′” > 
< div class = ‘individual’ > < div class = ‘author-img ” > 
< a href = ‘ http://ENDERE -CO-OF-THE-AUTHOR PAGE-1 ” >
< img alt = ” height = ’74 ‘ src = ‘ http://ENDERE CO-OF-THE-AUTHOR-PICTURE-1 ‘ width = ’64 ‘ /> </ a > 
</ div > 
< div class = ‘author-text ” > 
< h3 > < a href = ‘ http://ENDERE -CO-OF-THE-AUTHOR PAGE-1 ‘ > NAME OF AUTHOR 1 </ a > </ h3 >
< p > Descriptive text </ p >
</ div > < font > </ font >
< div style = “clear: both” /> 
</ div > 
</ b: if > 
< b: if cond = ‘data: post.author == “AUTHOR-2′” > 
< div class = ‘individual’ > < div class = ‘author-img ” > 
< a href = ‘ http://ENDERE CO-OF-THE-PAGE-AUTHOR-2 ” > 
< img alt = ” height = ’74 ‘ src = ‘ http://ENDERE CO-OF-THE-AUTHOR-PICTURE-2 ‘ width = ’64 ‘ /> </ a >
</ div > <
< div class = ‘author-text ” > 
< h3 > < a href = ‘ http://ENDERE CO-OF-THE-PAGE-AUTHOR-2 ‘ > NAME OF THE AUTHOR 2 </ a > </ h3 > 
< p > Descriptive text </ p > 
</ div > 
< div style = “clear: both” /> 
</ div > 
</ b: if > 


<!— Need to open as many conditional —-> 
</ div > <!— close the div for post-footer-line post-footer-line-1 —> 


</ div > <!— close the div for post-footer —>

 
 




Need to open as many conditional


Examples of styles applied to class created:


/ * Style for the container * / 
.  Individual {
background : # F1F0EB ; 
border-top : 1px solid # CC0000 ;
border-bottom : 1px solid # CC0000 ; 
margin : 0 2px 9px 0 ;
padding : 5px ;}


/ * Style for the avatar image * / 
. Author-img {
float : left ; margin-right : 3px ;} 


/ * Styles for text * / 
.  {Author-text 
color : # 333 ; 
font-size : 12px ;}
/ * Styles for links in the text * / 
. Author-text a: link,. Author-text a: visited {
color : # CC0000 ; 
font-size : 12px ; 
text-transform : uppercase ;} 


. Author-text a: hover {
color : # CC0000 ;
text-decoration : underline ;} 


3) Separate the AdSense publisher according to the author of the post

You can use ads in the account of each author, or a single account. In the second case, so you can manage the pages of the results of each author, the first procedure is to create a criterion in the AdSense settings, for example, naming this criterion with the author’s name: Then, when creating the ad includes the criteria with the name of the author. This will generate a google_ad_slot different for each criterion. The account administrator can get a report sorted by criteria.

About the author

Krishna Thapa

I am Krishna Thapa, I am from Nepal and live in Israel. I love to write blogs on Art, Information and Technology. Thank you for stopping by, keep visiting.