Xavier What we have to say on Twitter
Xavier Xavier

Xavier Media®

 line

  Subscribe by email Subscribe via email

  Feed link Subscribe via RSS
  What is RSS? What is RSS?

  MyXavier Follow @XavierMedia

  Twitter Follow @XavierMedia

  Facebook Our Facebook page

XavierMedia.com

Webmaster Tools

Keywords

RSS iPhone and iPad stuff – Most Useful Things

How to display the Entrecard widget only at your main page

September 1st, 2009 by Andreas from Xavier Media® in Blogging, CGI & PHP, SampleAddress.com, The World According to Xavier, Tutorials. Topics: , , ,

Today Entrecard will stop rewarding site owners for displaying the Entrecard widget at their web site :( since only the person dropping will get credits as of now and not the blog too as it used to be in the good old days.

Since you as the site owner is not getting anything for displaying the widget it's just a waste of useful advertising space to show the widget on all your pages, and therefore it could be a good idea to only show the widget at your main page instead of site-wide.

If you use for example self-hosted WordPress as your blogging platform it's quite easy to only display the widget at your main page. Just open the WordPress template where you have the widget code (footer.php for example) and replace the widget code with this code instead:

<?php if ( is_home() ) { ?>
<CENTER>
<script src="http://entrecard.s3.amazonaws.com/widget.js?user_id=XXXX&type=standard_127" type="text/javascript" id="ecard_widget"></script>
</CENTER>
<?php } ?>

Replace XXXX with your Entrecard ID (can be found in your HTML code) and you're ready to go. Whenever a user is watching the main page of your blog they will find the widget code (the Entrecard scanner will of course too), but if the user is watching any other page the widget will not show up.

If you would like to have the Entrecard widget replace by another ad network (that's actually rewarding for side-wide placements ;-) ), then just use the following code:

<?php if ( is_home() ) { ?>
<CENTER>
<script src="http://entrecard.s3.amazonaws.com/widget.js?user_id=XXXX&type=standard_127" type="text/javascript" id="ecard_widget"></script>
</CENTER>
<?php } else { ?>
<CENTER>
<!– ADD THE CODE TO SHOW ON ALL YOUR OTHER PAGES HERE –>
</CENTER>
<?php } ?>

So now you can show the Entrecard widget on your main page and on all other pages you can show for example the code from a banner exchange instead. This is a much more efficient way of displaying ads on your site ;-)

About the author
Andreas co-founded Xavier Media® in 1996 and has since been involved in all kinds of development, marketing and making money online.

 

You may also be interested in...
The end of Entrecard?
AboutUs.org widget – finally
Strange Entrecard messages

Subscribe to new posts from this blog

3 Responses to “How to display the Entrecard widget only at your main page”

  1. jj-momscashblog Says:

    Hey Andrea, Are you going to stop showing your Entrecard widget? I think it's still a good ad tool and it get's people coming to ones blog. I really don't care for all of the changes either but I think it will work out in the end with the new owners.
    .-= jj-momscashblog´s last blog ..Make Money Selling Used Books =-.

  2. Andreas from Xavier Media Says:

    We will still show the Entrecard widget, but only at the main page because they are not rewarding for having the widget site-wide. On the other pages we will use the space for other widgets that reward for more exposure.

  3. Imran | IT Buzz Says:

    I've been looking for this from many days ultimately found it here thanks a lot :)
    .-= Imran | IT Buzz´s last blog ..Increase your ram with usb drive =-.

Leave a Reply

Powered by WP Status.net plugin.

RSS XavierMedia.org

RSS Easy PLR

 line
 line  line
 line © Copyright 1996-2012 Xavier Media®. All rights reservered.
Contact us | Support/help | Privacy Policy | Company Info
The World According to Xavier | Domain Names