Jacopo Nardiello

Lost in the 2.0 Nebula 

Wordpress How-to: Add an Author Box into your posts

In the last days i've been playing with wordpress. I was working on my new project lascienza.net and i decided to add a small square in the end of each article in which were supposed to be shown author's details, including twitter and facebook.

The process wasn't too painful and i've chosen to share it with you, i'm pretty sure it will be somehow useful to others in future.

Let's start.

The final result
well, this is just to show you what we are going to get as result of this tutorial.

In the end of the article you will see something like this:


Ok, so we will have:
  • Title
  • Name + Personal Author link
  • Author Photo
  • Author Description
  • Author contacts

Note that this design was made on my website, you can fully remake it, assembling, styling the box or adding more informations as you wish. Obviously you will require a basic knowledge of XHTML and CSS to do that. This tutorial is just to give you an idea, to introduce some tricks in order to get the job done, once you have understood each step you can simply do whatever you want, no limits but creativity!

Styling the Box
Ok, we are going to work on the file called single.php, you can find it in wp-content/themes/yourtheme/ folder.
This file, according to wordpress codex:

The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.

Now, once opened the file you have to find where you prefer to place your box. If you wish to place it in the end of the article (as i did) you just have to find in the code where comments start, right before those lines is where you will have to place your divs. As i said before, nothing bad if you will place it somewhere else in the page.

here some XHTML code:
<div id="author-square"><h3>Title</h3> // Box + Title
<div id="main-data"></div>  //Author's Name, Home Page and photo
<div id="description"></div>  //Description
<div id="auth-contact-data"></div>  //Other data
<div class="clear-float"></div>    //This div is to clear floats effects
</div>

As you can see there's a main square in which are placed 3 columns. First column for Name, Home page and Photo, Second for Description and third for additional data.

And here CSS:

#author-square{
border: 1px dotted #DDDDDD; 
padding: 10px 10px 10px 20px;
height: 200px;
background-color: #F0F0F0;
width: 618px;
}

#author-square img{
margin-top: 10px;
}

#main-data{
width: 180px;
float: left;
}

#description{
width: 270px;
float: left;
margin-top: 25px;
margin-right: 15px;
}

#auth-contact-data{
width: 150px;
float: left;
margin-top: 25px;
}

.clear-float{
clear: both;
}

I'm not going to comment line per line, i assume you can read CSS and you know what that means. Just worth to notice that:
  • My square is large 618px
  • These 3 squares have float:left, they are aligned on the left.
As you could see nothing special in the code. We have just styled a little bit our box, the interesting part is starting now.

Adding Author Name and Home Page Link
This is easy. We are going to use wordpress functions called: the_author() and get_the_author_meta()
  • the_author() function will just print author name as defined in the profile wordpress admin area.
  • get_the_author_meta() is a very useful function that let you work with data defined in the author profile page. Basically you can use it to assign any data defined in the author profile to your own variables.
Add the following code to your main-data layer:

<?php echo "<b>"; 
the_author(); 
echo "</b> "; 
$url=get_the_author_meta('user_url'); 
echo "<b>Home Page</b>"; ?>   // Posterous is displaying wrong this code, check out the link and add <a href> tag

First three lines to display the_author(), that's name/surname/nickname of the author as defined in the profile.
With $url=get_the_author_meta('user_url') we get (as the name suggest) the user url defined in the profile page, with last line we display the XHTML code.

Adding Author Photo to the box

There are several plugins for this, as we are all a bit geeky we all love making things by ourselves, that's why we are going to code instead of using any add-on.

Here you will find my reference tutorial, there you will find nothing more than what i'm going to write here, just worth to mention.

The General idea is pretty simple. We are going to name each author pic with the author ID and we will use wordpress functions to display it. Follow these steps.

First Step: Create a folder under /images/ called authors in your wordpress theme folder. The final path should be something like /wp-content/themes/yourtheme/images/authors, obviously you can choose any other path on your preference.

Second Step: Find the Author ID. How? well, go to admin panel in wordpress. Click on Users and than click on the name of the author you want to upload the photo. The profile page of the user will now open and in the url bar you will see something similar to this:


That small voice in the url called user_id is exactly the number you will need.

Third Step: Rename the Author pic as the author ID. In our example you should name it as 2.jpg
Fourth Step: Upload the picture in the /authors/ folder you've created previously.

Now the coding part.

Step Five: add following code to the XHTML we have defined before.

<br /><img src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg" alt="<?php the_author(); ?>" title="<?php the_author(); ?>" />

Let's write some comments. We are adding an image to the box,

src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg"
With this line we are saying to the browser to connect to the authors folder placed in our template directory and look for an image called exactly as our author ID. 

alt="<?php the_author(); ?>" title="<?php the_author(); ?>" 
here we define Alt and Title Attributes using the_author() function.

Now our code should looks like this:

<div id="author-square"><h3>Note sull'autore</h3> 
<div id="main-data"><?php echo "<b>";the_author(); echo "</b> "; 
$url=get_the_author_meta('user_url');
echo "<b>Home Page</b>";?> 
<br /><img src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg" alt="<?php the_author(); ?>" title="<?php the_author(); ?>" /></div> 
<div id="description"></div><div id="auth-contact-data"></div><div class="clear-float"></div></div>

Now it's time to add decription and contact links.

Description

Adding the description is easy, northing different from what we have done till now.

We are still using the the_author_meta(); function, this time with an attribute called 'user_description', this is going to display the description for the profile.

this is how code will look like:
<div id="description"><?php the_author_meta('user_description'); ?></div>

Adding Custom Information into an author profile 
This is maybe the most interesting point in the whole tutorial, we are going to add some information in the profile of each author. Than, if those fields are defined we will use them into the box we have been working on till now.

I found this trick on wpbeginner.com, here.

You have to open functions.php file in the folder of your theme.
add following lines:

<?php
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';

//add Facebook
$contactmethods['facebook'] = 'Facebook';

return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
?>

In this code example we are adding 2 fields called twitter and facebook, same method can be used to add any information you like.
Now the profile admin panel will look like this:

as you can see our custom fields are now visible.

Ok, how can we manage these data? pretty simple, exactly in the same way we have been working till now.

Open you single.php file again and add following code in the auth-contact-data div:

<?php
//disaplaying Twitter & Facebook, check if they are defined and display 
$twitter=get_the_author_meta('twitter');
if($twitter!=""){
echo "<b>Twitter</b>: @$twitter<br />";
}
   $facebook=get_the_author_meta('facebook');
if($facebook!=""){
echo "<br /><b>Facebook</b>:<br /> <a href="http://facebook.com/$facebook" >";
the_author();
echo "</a>";
}
 ?>

Calling the get_the_author_meta('twitter') and get_the_author_meta('facebook') we will assign to our variables $twitter and $facebook fields values.
Using two simple if cicles we are checking these variables were defined in the profile, if so we display them.

The Final Result

This is the final complete code for the single.php page:

<div id="author-square"><h3>Note sull'autore</h3><div id="main-data"><?php echo "<b>";the_author(); echo "</b> "; 
$url=get_the_author_meta('user_url');
echo "<b>Home Page</b>"; //the_author_meta('display_name'); the_author_meta('user_url');  ?><br /><img src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg" alt="<?php the_author(); ?>" title="<?php the_author(); ?>" /></div><div id="description"><?php the_author_meta('user_description'); ?></div><div id="auth-contact-data">
<?php
//disaplaying Twitter & Facebook, check if they are defined and display 
$twitter=get_the_author_meta('twitter');
if($twitter!=""){
echo "<b>Twitter</b>: @$twitter<br />";
}
   $facebook=get_the_author_meta('facebook');
if($facebook!=""){
echo "<br /><b>Facebook</b>:<br /> <a href="http://facebook.com/$facebook" >";
the_author();
echo "</a>";
}
 ?>
</div><div class="clear-float"></div></div>

I really hope you enjoyed the article, any question or correction please use comments!

Consider that there are many ways to achieve same result shown in this article, probably some are even better, and i'm sure my code can be improved in many ways. This is just a path, any improvement is really welcome!

Loading mentions Retweet
Filed under  //   Blogging   Webdesign  

Comments [0]

Entrepreneur: Do you need an Elevator Pitch? Yes, you do.

2254123309_62f9bef920.jpg
Original Image from Laurenmanning on flickr.

What is an elevator pitch?

According to wikipedia:

An elevator pitch is an overview of an idea for a product, service, or project. The name reflects the fact that an elevator pitch should be possible to deliver in the time span of an elevator ride, meaning in a maximum of 30 seconds and in 130 words or fewer.

There's nothing more to say about, It's a short text in which you describe your idea/project.

Do you need it?

If you're an entrepreneur, a freelancer, a marketeer, a project manager, a web geeky guy or a sales-man the answer is one: YES!

The Elevator Pitch is one of the most effective ways to show why your idea or product is great, what you have achieved and what you want from your audience. One of the main "weapons" you have on your side to convince them you are worth their trust.
This is why you definitely need to work that out.

Usually simple things hide behind them a huge work. Not that simple to write down in few words complex concepts, right? 
you have to be careful especially if you're searching for new investors. So, here you will find few essential advices, follow them and be sure you'll be able to write a great elevator pitch.

Fundamentals: writing down your elevator pitch

It's short: Yeah, i know it's difficult but you should care a lot about length. If you're writing it now and you see that it's over 2 paragraphs probably you already went too far. Keep in mind, within 130 words, 30 secs.

It's strictly connected to your brand: Everybody know how important a logo is, right? Exactly as a logo, your elevator pitch is part of your brand and sometimes it's even more important than the visual identity itself. It's connected to your identity and should be used as often as possible. People will recognize you because they will recognize your elevator pitch.

Not a closed Box: If you're going to use it in a discussion or a public speech you should be ready to defend it, discuss and challenge. You should be conscious about what you're talking about. I'd add that it's not an empty box as well. Avoid empty wide-used expressions, be effective. Each term should have a meaning.

Clear and Easily Understandable: Key feature. If you've to learn anything from this post let this be the thing. It must be easy to understand, clear. Avoid ambiguities, errors or difficult specific words.

Few Questions to find your answers

The truth is that there's no perfect recipe for this. Best thing you can do to write down an effective text is just to find right answers for following questions:

- Who am i talking with?
- Who/what is my target?
- Do i have a short-term strategy?
- Have i achieved any result yet?
- Strength and Weaknesses of my project?

References:

This post was written on the italian post from Francesco Gavello. I must admit this guy keeps writing amazing articles and he knows his way in the world of blogging and new media. I've learnt so many things form him, a thanks wouldn't be enough. 

I hope that this post was anyhow useful.

Loading mentions Retweet

Comments [0]

Steve Jobs Stanford speech, Inspirational words.

I found this video extraordinary both under professional and personal point of view.

Loading mentions Retweet
Filed under  //   Corporate   Inspiration  

Comments [0]

Merry Christmas!

Ok, time has come. 2009 is ending, new year is coming. I wish to you all guys a good time, merry christmas!

Loading mentions Retweet

Comments [0]

15 Corporate Site Templates and Designs you should consider for your business

Whether you are a freelancer looking for some inspiration or an entrepreneur looking for a ready-to-use template for your business this is the post for you.
Here you will find a nice collection of 15 templates for your corporate site. These designs are clean, effective, optimized, creative and beautiful and i definitely recommend them. They will boost your brand and image keeping costs little as you can buy them for less than 15$.

Aflatun Design

Trefoil Business





?ui=2&view=att&th=125b0ea6a24d596f&attid=0.1&disp=attd&realattid=ii_125b0ea6a24d596f&zw








You can find more on Themeforest, feel free to suggest more templates

Loading mentions Retweet
Filed under  //   Corporate   Webdesign  

Comments [0]

Why you shouldn't connect your facebook account with twitter.

Since i started using twitter i integrated it with my facebook account. Right now, after several months, i understand that was a wrong choice (at least in my case)





What's wrong with that? 


Well, to be honest i'm still convinced integration between facebook and twitter is a good thing. Updating your status on facebook with twitter messages can be a great opportunity, still you should evaluate carefully the situation and understand whether that can improve or not your social image and brand.



My Situation

I started using facebook almost 2 years ago and recently i've used it to keep in touch with all my friends, with my family and also with collegues or people met randomly at parties, dinners and so on.

I've about 400 friends right now in my list and 80% of them have nothing to do with Web 2.0 or work.

I'm not anyhow using Twitter for "personal" purposes, unlike Facebook. I love this social network that has shown its power as a real-time news reader used by almost every blogger or social media guy to spread valuable contents, texts and resources. That's the main usage i'm doing as well: promoting articles, RTs valuable content and so on. Nothing to do with my private life.



The Issue

Well, I've chosen to disconnect twitter from facebook only because of this: The Audience. Few of my contacts in facebook were interested in my working links, most of them took hundreds of messages 'Ive sent in the last year just as spam (or sort of).

The lesson is: Web 2.0 services are improving more and more, they are moving in the direction of integrating content and driving larger amount of information, but still common sense is the king. 


Before linking different services and accounts you should ask yourself: Who is going to read my messages? How the audience will approach them?



Twitter and Facebook, Different audiences mean different strategies of promotion.

Twitter and Facebook has developed different "styles" in order to deliver effective information, you can't mix them up. RT is a direct way to spread content on Twitter, just imagine it on Facebook. Its effectiveness will drop, people simply won't understand the update of your status and even in the case they do, probably they will be annoyed by the "twitter style" short message as Facebook standard updates are made of: longer text and images.


Tweet seen on facebook: awful




Standards facebook update




Obviously, if you're using both twitter and facebook for personal purposes as you're not anyhow working in the 2.0 sphere the connection between these social networks can still make sense.

Loading mentions Retweet
Filed under  //   Blogging   Social Networks  

Comments [0]

Pages Architecture and Contents Hierarchy: What Bloggers and Online Editors should know

It doesn't matter if you're a blogger, a web editor or an Entrepeneur. What you should keep in mind is: Content Hierarchy and Organization matters. 

You don't need to be a Web Marketeer or a User Interface designer to understand why it's fundamental to organize carefully each page of your website in order to make it Accessible and Clean. It's not so obvious how to achieve that and it usually takes lot of time (and experience) before you are able to create a SEO-friendly, clean pages architecture. 

This is exactly what we are going to discuss in this article: Basic and Advanced principles to create effective pages that your users and Search Engines will like.

I'M NOT TALKING ABOUT DESIGN
I want to underline that i'm not going to talk about how to Design a webpage; instead, i'm going to explain what principles should rule the programming and design process. Good stuff for Web designers and Web developers.

BASIC RULES
My experience has shown me LOT of people wasting great ideas due to lack of common sense. You should never forget that a website is a one-goal bridge: let information be delivered to readers. Users are lazy, first they scan the page and then, if during the "scanning" process they are able to grab information they were looking for, they start reading.

BAD TITLE, GOOD TITLE
Users start scanning the page by titles, you should organize your content in a way that allows readers understand immediately what next lines are about
Receipt for an effective title is: Make it BIG and don't make it tight.
Let's see come examples of good and bad titles:

This is a Good Title

e867f41379494f49007e52736e188808.png

This is a Bad Title
717a6881013ab165b2f286648f43a5f6.png

Remember that through titles you can organize your content hierarchically, i will get deeper on this later. For now you should keep in mind that Title size should be proportional to its importance. Main title will be the biggest in the page, sub-paragraphs titles will be a bit smaller and nested paragraphs will decrease size proportionally to their position in the tree.

Let's check this out to clear any doubt:

LINKS
Links are part of the core of your blog/website, you can use them to drive your user experience and to literally connect different pages on the same subject.  We can define two kinds of Links: Static Menu Links and Inline Links. Static links are used in the menu, the footer or in the sidebar and as you can imagine they have a primary role in the page. 

Inline Links
Wikipedia launched first a massive usage of inline links. Basically i'm talking about those links within the content mainly used to define words or to call external sources.
Well, Inline links have a strategic role in the page, you can use them to define words the reader may not know or to connect external pages to your article. Keep it in mind: users are lazy that's why they will not look for links, you should take care to make them visible in the text. 

IMAGES
Images are optional, use them in your pages according to page lenght. One image from time to time makes the text brighter for the reader. Personally I agree with this point of view but still you can easily find an example of successful sites that do not use images by default in their content pages.

Easy, right? Simple rules to organize your content, missing any of these tips would have only one result: Chaos. Before php functions, jquery effects or photoshop design you must define what the page will be with its typo, titles, texts and links.

CONTENT HIERARCHY: Titles, how to implement them
SEO matters
I already said why titles are important from the user's experience point of view, but that's not all. Titles are useful also for Search Engines. Why? because they help crawlers and engines to recognize what your page is about and rank it into SERPS.
Seomoz has recently decreased importance for titles in the ranking process, although I think this is a primary feature you should work on. Search Engines, google first of all, work in the direction of presenting to users quality pages and the content in higher ranks. As Titles and a correct Hierarchy of contents is so important for users I bet it has some kind of meaning for ranking in search engines as well.

Importance of Headers Tag. H1, H2, H3 are your friends.
Both if you're using an HTML editor (such as wordpress) or if you're editing directly the page you should remember the importance of h1,h2 and h3 header tags. Use them to represent the hierarchy of your document. Main Title will require h1 tag, subtitles h2 and so on.
In particular search engines use those tags to identify titles in the page, that's why using just a CSS style on a usual text is something you should avoid.

Loading mentions Retweet
Filed under  //   Blogging   Webdesign  

Comments [0]

Blogging and Social Media: The Role of Trust and Authority

How can you build a successful community on your blog? How can you improve your earnings using Advertising and Affiliation programs? How to, in general, success in Blogging?


All this questions have one common answer: Build a solid Authority and earn your users trust.


Market has changed and Marketing rules are changing as well. Internet is bringing what i consider a real revolution.
Seth Goding first introduced the change defining the idea of "Permission Marketing", we are living the Economy of Trust where the new ROI is User Attention to your content.

 

If you're a Blogger, a Marketeer or simply working on the internet you should definitely work on this topic. 

Here some great Articles and Posts.

Loading mentions Retweet
Filed under  //   Blogging   Marketing  

Comments [0]

iPhone apps to boost your productivity

You know what i feel like when i'm looking for another smart iphone application? i feel like an hungry cat at the butcher's or at least like my wife when she's going shopping.

Man, that's really not an easy job to make your iphone be an iPhone. I mean, it's much easier to turn the greatest achievement of technology into a standard cellphone stuffed with useless bullshits. Come on, be honest, are you using the potential of your techno-baby to the full? How many times your iPhone instead of helping you was just another source of distraction? 

 

Consider this list as a guideline to optimize your productivity and your workflow. Principles are simple: save time, don't spend money: invest it and ( the last but not the least) keep it easy! All these applications support full integration and synchronization, they are all high quality software and their long-term value is far higher than their price.

 

Here we go.

 

Talking IM, we have 2 leading apps in this area: Beejive and IM+. Both of them are very well designed, both of them have Push Notifications, Beejive is more stable in this than IM+, on the other side IM+ supports Skype protocol which beejive doesn't. Beejive looks more professional and it is more realiable about push connection, on the other side it costs 30% more than IM+. For most of the users both of them will be more than fine, you will be able to be full-time connected and to get notifications when someone contacts you.

 

Twitter is widely used and i bet every iphone owner has his own account on which spends even hours a day. Well, we have a wide choice of clients that will let you tweet. Some of them are free, such as tweetdeck or twitterrific, but not many of them can be recognized as full-featured and optimized to improve the user's experience (which means to save time using it). Well, at this moment there are 2 clients that will for sure improve the quality of your time spent tweeting: i'm talking about Tweetie and Simplytweet. Tweetie is the most complete twitter client with a wide range of features with which you will be able to surf and categorize your replies, direct messages or simple tweets. It would be perfect if it only supported Push notification, unfortunately it doesn't. That's why you should consider Simplytweet. It is much simpler than tweetie and is missing of some interesting features, but you will be notified directly on your dashboard. This will let you reduce time spent on twitter without having any loss on the "social" side.

 

If you're reading this article you already probably know what ToDos software is. There are so many apps in the App Store that will let you create and manage todo lists, but how many of them are worth their price? not many. Well, for advanced  and really really busy people the final software will be Omnifocus, this is the small brother of the Mac version. It is complete, full featured, constantly updated and fully integrated and synchronized with the desktop version (only mac, sorry windows users!). The price of this amazing app (i can't live without it) is 20$(US) and 16 eur (EU), i know it looks like really expensive (actually it is) but as i said this is an investment for everyone who uses it for "serious" and professional purposes. If you need something easier (and cheaper, 2.39 eur in the EU) but still kind of serious with sync and sharing options i definitely advise you zenbe lists. This apps let you organize your todo tasks in different lists and share them on different devices, check out their website for more info. If you are a weird scrooge with no real needs other than tracking useless things then you can maybe go for ToDo's, it is simple with few features, but it does what it says and it's free! There's another app that is worth being mentioned: Remember the milk. It is a web based application, it lets you organize and share todo lists and small notes and has many other features like sync with desktops (both win and mac), the apps itself is free the online service will cost 25$, a good middle way between Omnifocus and other applications. 

 

If you are overwhelmed with stickies and notes or if you'r running out of memory then maybe you should consider getting a note apps. Evernote or Reqall are the best notes application available at the moment. Both of them support Photos, Texts, Voice, Internet and Mapping. Both of them are webbed and they let you keep your notes fully sync between iphones and desktops. You can also use them together as they support eachother! Both apps are free within certain limits, you will be able to get a Premium account once you are sure they are useful for your daily activities.

If you are ok using just a local apps i recommend YouNote, well designed and absolutely free!

 

 

For your Files the final application is DropBox! DropBox gives you 2GB of free online storage and installing the software (Mac, PC, Linux) on your desktop you will have always at hand all your important files. It has also sharing features and wether you need more space you will be able to upgrade at any time!

Since i started my freelance activity i can't work without it, especially considering the fact that i'm using different Computers and very often i need to get the files on the move!

 

I hope this article was useful! Do you have any other apps you feel like adding?

Loading mentions Retweet
Filed under  //   Productivity   Software  

Comments [0]