miercuri, 26 ianuarie 2011

How To Add Thesis Teasers To A Static Homepage Graywolf's SEO Blog

How To Add Thesis Teasers To A Static Homepage Graywolf's SEO Blog


How To Add Thesis Teasers To A Static Homepage

Posted: 26 Jan 2011 08:00 AM PST

Post image for How To Add Thesis Teasers To A Static Homepage

So you’ve got Thesis for your WordPress site (and if you haven’t got Thesis yet go and check out Michael’s excellent Thesis review to find out why you should) and you want to use a static homepage to give your visitors a consistent experience when they visit your site.  The problem is that you really like the look of Thesis’ teasers for showing updated links to your blog posts but Thesis doesn’t give you an easy way to add teasers to your static homepage.

So what do you do?  You are using Thesis after all.  One of the most flexible frameworks available for WordPress.  There must be an easy way to set up static homepage teasers using Thesis hooks.  Right?

Not exactly.  If you’re looking for a simple line of code to tell Thesis, “Hey! Stick some blog post teasers over here on my static homepage!” then I’m afraid you’re out of luck.  But with a few dozen lines of code and a little bit of know-how, you can do exactly that.

We’ll start by taking the code that Graywolf created for adding a Lifehacker-style carousel of your featured posts above your site’s header.  We’re going to break this code down into its constituent parts and make a few simple tweaks so that we can use it to display these featured post teasers on your static homepage.

To start with, we’ll take the first few lines from Michael’s top_carousel function and rename it as home_carousel like so.


function home_carousel(){
global $post;
if (is_front_page ()){
}
}

You’ll notice that we’ve also set it so this function is only activated if the page being displayed is_front_page so that it will only appear on our site’s homepage.

Next we’re going to add in the “wrapper” that will contain our homepage teasers carousel so that we can add some visual styling using CSS once we’re done.  Once again, this is simply a case of taking Michael’s original top_carousel code and changing the names to suit our new home_carousel instead.  I’ve also added in extra line with a h2 title for the homepage teasers block which you can edit or remove completely as you see fit for your site.


function home_carousel(){
global $post;
if (is_front_page ()){
echo '<div id="homecarousel">';
echo '<h2>Featured Posts From Our Blog</h2>';
echo '</div>';
}
}

Now we can use the exact same query from Michael’s original top_carousel function to find our featured posts to display in our new home_carousel.  If you prefer, you can change the query to look for a “featured” tag instead, but if you’re already using the top_carousel to show posts from a “featured” category elsewhere on your site you might as well stick with the category query to find the posts for your homepage teasers as well.  One change that we will make here is to only show the 3 most recent “featured” posts because we’re going to put this in our content column and 3 posts will fit quite nicely, whereas 6 would take up too much space on our homepage.


$the_query = new WP_Query(array(
'category_name'=>'featured',
'orderby'=>'date',
'order'=>'DESC',
'showposts'=>'3'
));

Next up we’re going to use the same code from the original top_carousel to define how to display the posts that our query just found.


while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
$image = get_post_meta($post->ID, 'thesis_post_image', $single = true);
echo '<div class="carouselu">';
echo '<a href="';
echo the_permalink();
echo '" >';
echo '<img src="http://www.YOUR-DOMAIN.com/wp-content/themes/thesis_18/lib/scripts/thumb.php?src='.$image.'&w=140&h=140&zc=1&q=100"></a>';
echo '<a href="';
echo the_permalink();
echo '" >';
echo the_title();
echo '</a>';
echo '</div>';
endwhile;

Remember to change YOUR-DOMAIN to (you guessed it) your domain name and also check the rest of the path for where Thesis stores thumbnail images for your posts.  If you’re using the current version of Thesis, v1.8, and you’ve left it in the default directory then you can leave it with thesis_18 but you will have to remember to come back to your custom function and change it whenever you upgrade to a new version of Thesis.

Last, but not least, we need to remember to clear the div’s that we’ve set for this function so that we can style it with CSS later.  To do that we add the following line of code.


echo '<div style="clear:both"></div>';

Now we put it all together and we get.


function home_carousel(){
global $post;
if (is_front_page ()){
echo '<div id="homecarousel">';
echo '<h2>Featured Articles From Our Blog</h2>';
$the_query = new WP_Query(array(
'category_name'=>'featured',
'orderby'=>'date',
'order'=>'DESC',
'showposts'=>'3'
));
while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
$image = get_post_meta($post->ID, 'thesis_post_image', $single = true);
echo '<div class="carouselu">';
echo '<a href="';
echo the_permalink();
echo '" >';
echo '<img src="http://YOUR-DOMAIN.COM/wp-content/themes/thesis_18/lib/scripts/thumb.php?src='.$image.'&w=140&h=140&zc=1&q=100"></a>';
echo '<a href="';
echo the_permalink();
echo '" >';
echo the_title();
echo '</a>';
echo '</div>';
endwhile;
echo '<div style="clear:both"></div>';
echo '</div>';
echo '</br>';
}
}

Now that you’ve put it all together just copy and paste your code into your Thesis custom_functions.php file and then add the following line to activate the function.


add_action('thesis_hook_after_post_box', 'home_carousel');

This tells Thesis to add your new homepage teaser carousel after any post content in your homepage’s body but you can easily change this to move it to other places on your homepage.  Check out the ever-useful Thesis Hooks Reference for a visual guide to which hooks go where.

Now that you’re function is in place the only thing left to do is add some styling to it using your custom.css file.


#homecarousel {border:1px solid #efefef; padding: 0px;padding-left:10px;}
#homecarousel h2 { font-size: 14px; font-weight: bold; text-align: center; }
.carouselu {width:150px;float:left;padding:3px;text-align:center;}
.carouselu IMG {border:2px solid #ccc;display:block;}

For the sake of this example we’re going to use the same CSS styling as Graywolf uses for his original top_carousel so that you can get a consistent look if you’ve just taken the sample code and used it on your site.  The one addition I’ve made is the line that styles the h2 title element, making the font bold and centring the title within the homepage teasers box.  If you’re feeling adventurous it’s very easy to make changes to Thesis’ custom.css to update the look of your homepage teasers.

Thesis Teasers on a static WordPress homepage

In the case of the example screenshot here I’m using a 2 column layout with Thesis, which has given me extra room to increase the showposts number from 3 to 4. I’ve also made some changes to the custom CSS to match the overall design of my site. One of the great things about Thesis is how easily you can experiment with design changes using the built in Custom File Editor, which is so much quicker than changing and FTPing updated files over and over until you’re happy with the result.

Ken Jones is an Independent Online Marketing Consultant from Coventry in the UK who freely admits that he knows very little about programming, which is why he’s such a big fan of Thesis because it makes it so easy for people like him to produce great looking websites.  You can connect with Ken and follow his stream of consciousness Twitterings @TheKenJones.

tla starter kit

Related posts:

  1. How to Add a Carousel to Your Thesis Blog If you’ve spent any time visiting blogs lately chances are...
  2. How to Add a Visual Slider to Thesis The following is a tutorial on how to add a...
  3. Thesis Tutorial – How to Add Adsense Section Targeting Using Adsense on your blog usually isn’t the most profitable...
  4. Make Thesis Work Better With Digg and Facebook If you’re involved with social media sites like Digg, Facebbok...
  5. Thesis Tutorial – Adding Date Based Triggers to Your Posts There are a lot of times when you are working...

Advertisers:

  1. Text Link Ads - New customers can get $100 in free text links.
  2. BOTW.org - Get a premier listing in the internet's oldest directory.
  3. Ezilon.com Regional Directory - Check to see if your website is listed!
  4. Glass Whiteboards - For a professional durable white board with no ghosting, streaking or marker stains, see my Glass Whiteboard Review
  5. Need an SEO Audit for your website, look at my SEO Consulting Services
  6. Link Building- Backlink Build offers 45 PR5+ Backlinks for $295
  7. KnowEm - Protect your brand, product or company name with a continually growing list of social media sites.
  8. Scribe SEO Review find out how to better optimize your wordpress posts.
  9. TigerTech - Great Web Hosting service at a great price.

This post originally came from Michael Gray who is an SEO Consultant. Be sure not to miss the Thesis Wordpress Theme review.

How To Add Thesis Teasers To A Static Homepage

Winning the Future

The White House Your Daily Snapshot for
Wednesday, Jan. 26,  2011
 

Winning the Future: The State of the Union Address

Last night, President Obama delivered the State of the Union Address at the U.S. Capitol. In case you missed it, check out the video of the enhanced version of his speech.

If you have questions about the President’s State of the Union Address, we’ll be answering as many as we can throughout the week. Visit WhiteHouse.gov/sotu to find out how to get involved.

The State of the Union Address

In Case You Missed It

Here are some of the top stories from the White House blog.

Interactive Feature: The First Lady’s Box, State of the Union Address 2011
Learn more about the remarkable individuals who will join First Lady Michelle Obama for the 2011 State of the Union Address.

My Guests at Tonight’s State of the Union Address
Continuing her commitment to support our nation’s military families, Dr. Jill Biden writes about her guests for the 2011 State of the Union Address: wounded warrior Army Sergeant Brian Mast and his wife Brianna.

The President’s State of the Union Address: What They’re Saying
With reactions pouring in to the President's State of the Union Address, we thought you might be interested in some of the early responses from observers across the country

Today's Schedule

All times are Eastern Standard Time (EST).

9:00 AM: The President departs the White House en route Andrews Air Force Base

9:30 AM: The President departs Andrews Air Force Base en route Green Bay, Wisconsin

11:35 AM: The President arrives in Green Bay, Wisconsin

11:45 AM: The Vice President discusses how the Administration is incentivizing investment in innovation and helping to lay the foundation for American competiveness in the 21st century WhiteHouse.gov/live (audio only) 

12:35 PM: The President tours Orion Energy Systems, Inc.

1:00 PM: The President delivers remarks on the economy WhiteHouse.gov/live

1:30 PM: The President tours Skana Aluminum Company

2:50 PM: The President tours Tower Tech Systems, Inc.

4:10 PM: The President departs Green Bay, Wisconsin

6:00 PM: The President arrives at Andrews Air Force Base

6:15 PM: The President arrives at the White House 

WhiteHouse.gov/live   Indicates events that will be live streamed on WhiteHouse.gov/live.

Get Updates

Sign Up for the Daily Snapshot 

Stay Connected

 


 
This email was sent to e0nstar1.blog@gmail.com
Manage Subscriptions for e0nstar1.blog@gmail.com
Sign Up for Updates from the White House

Unsubscribe e0nstar1.blog@gmail.com | Privacy Policy

Please do not reply to this email. Contact the White House

The White House • 1600 Pennsylvania Ave NW • Washington, DC 20500 • 202-456-1111 
 
 
  

 

 

SEOptimise

SEOptimise


Not Using AdWords Remarketing? Don’t Delay! (Actually Do)

Posted: 25 Jan 2011 08:13 AM PST

I recently read an AdWords Remarketing tips post which made me think of a few ways to improve your AdWords Remarketing campaigns by introducing a delay between when a person visits your site and when you start showing adverts to them.

Image from Stuck in Customs on Flickr

Buying Cycles
One problem with Remarketing is that it is hard to measure incremental value from it. A remarketing conversion tells you that someone who visited your site came back to your site and then bought something; the causal link between the advert and the purchase is not as clear as it is with search advertising.

Giving users time to complete their purchase naturally before you start showing them adverts avoids this problem whilst still taking advantage of the main feature of Remarketing; that people who have already been on your website are more valuable than people who haven’t.

For an ecommerce client we set up a 7 day delay on their remarketing to match the length of their buying cycle.

To setup a delay you need to create a remarketing tag as normal and then create another list using that tag but with a shorter duration. In this case they have 1 tag across their whole site with two remarketing audiences associated with it, one of them has a duration of 21 days and the other has a duration of 7 days. Then create a custom list containing everyone in the 21 day audience and no one from the 7 day audience. Bingo! Now you have to wait to see if it works.

Consumables
Another client sells a product which uses a consumable that they also sell. They reckon that people will need a refill after about 6 months. Using AdWords Remarketing, we are able to target people 6 months after they purchase with adverts for refills. Awesome!

Setting this up can be a bit more complicated.

If you want to target everyone who purchased but with a 6 month delay then you can use an existing Adwords conversion tracking code as a Remarketing tag. Then you can define your audiences as above.

If you need to target only people who purchased a particular product then you will need to insert a new remarketing tag into the conversion page only if the customer has bought the product. This might be easy or hard depending on your platform and web development team.

Seasonals
I manage several clients in the travel industry. I have setup a Remarketing audience for them that targets people who have converted 11 months down the line; just when they will be thinking about their next holiday!

Image from joiseyshowaa on Flickr

The maximum duration for a Remarketing audience membership is 540 days (nearly 18 months) so there is plenty of time to take into account all sorts of seasonal variation.

I hope this post has given you some Remarketing ideas. Leave a comment or find me on twitter if you have any other Remarketing tips.

© SEOptimise – Download our free business guide to blogging whitepaper and sign-up for the SEOptimise monthly newsletter. Not Using AdWords Remarketing? Don’t Delay! (Actually Do)

Related posts:

  1. Top 10 tips & things you need to know about AdWords Remarketing
  2. The Value of AdWords Brand Bidding
  3. 2010 Predictions – How Well Did I Do?

Seth's Blog : The shell game of delight

[You're getting this note because you subscribed to Seth Godin's blog.]

The shell game of delight

Let's try a challenging thought experiment.

I'm going to pick a number between one and five, inclusive. I'm not going to tell you what it is. Now, try to guess. Focus hard, sharpen your senses, and see if you can guess what I'm thinking of...

Click on your guess (just one, please): one, two, three, four, five.

Cynics have already become annoyed at me. But most people, particularly if I added a little spin, would be delighted at their sensitivity and psi-power.

The point: you can easily create similar interactions in the way you do business with people. Setting up prospects, customers and bosses to be right is almost always worth the effort. It's so much more useful than setting people up to fail.

Why then, do we organize interfaces, manuals, contracts and relationships to have people fail merely because they didn't guess what we had in mind? When in doubt, make it so people succeed.

 
Email to a friend

More Recent Articles

Don't want to get this email anymore? Click the link below to unsubscribe.


Click here to safely unsubscribe now from "Seth's Blog" or change your subscription, view mailing archives or subscribe

Your requested content delivery powered by FeedBlitz, LLC, 9 Thoreau Way, Sudbury, MA 01776, USA. +1.978.776.9498

 

marți, 25 ianuarie 2011

You've Never Seen a State of the Union Address Like This


The White House, Washington


Good morning,

Tonight at 9 p.m. EST, President Obama will deliver the State of the Union Address and outline his vision for putting aside the politics that divide us and moving forward to create jobs, up our game to out-compete in the global economy, and win the future for our children and our country.  

This year we're trying something new.  As President Obama addresses the Nation, we'll offer a companion stream of visual aids, including charts and quick stats about what’s happening in the country.  You can view this feature at WhiteHouse.gov/SOTU.

Immediately following the speech, stay tuned for our live Open for Questions event with policy experts from the White House answering your questions about key issues in the speech.

Watch the speech and submit your questions:

The State of the Union Address: Watch and Engage

Throughout the week, we'll have plenty of ways for you to get involved and ask questions of President Obama and other senior Administration officials about the State of the Union Address.  See a full line-up of events and find out how to submit your questions: 

http://www.WhiteHouse.gov/SOTU

Don't forget to tune in tonight at 9 p.m. EST!

Sincerely,

David Plouffe
Senior Advisor to the President

P.S. The State of the Union Address is a major undertaking here at the White House.  You can learn more about the history and the making of this annual speech in our brand new "Inside the White House" video:

http://www.whitehouse.gov/Inside-SOTU 

Visit WhiteHouse.gov




 
This email was sent to e0nstar1.blog@gmail.com.
Unsubscribe e0nstar1.blog@gmail.com | Privacy Policy

Please do not reply to this email. Contact the White House

The White House • 1600 Pennsylvania Ave NW • Washington, DC 20500 • 202-456-1111