Apr
28
Showing ads on a perticular page

samir08:01 pm

I have a wordpress based blog and i want to display adverts only on the homepage of my blog and not on the sitewide, because i want to have a control on homepage and sitewide adverts. Is this possible?
This is very much possible because wordpress files can be customised to the maximum since its one of the best CMS made ever and anyone can play around with it and great blogs. Now lets get back to the point regarding showing some type of advert or code only on the homepage and not sitewide by limited its display.

<?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
You need to add your advert code here which is shown on the homepage only.
<?php } ?>

Another option would be trying with a php code which runs a statement where in if its homepage then certain code is run if not its void.

if (is_home())
{
echo ‘is_home() returned true’;
}
else
{
echo ‘is_home() returned false’;
}

and if you are looking for the easiest way then try out this following code :

<?php if ( is_home() ) { ?>
Here the content only on the index page
<?php } ?>

This is all a part of Conditional Tags feature of wordpress which has lot more options and the ones i have posted above are the easiest of all. Hope this helps you out in adding/showing some stuff only on the index/homepage of your blog and limit them from displaying on the sitewide section.


Filed Under Tutorials and Wordpress hacks | Add comment

Mar
12
Wordpress Blogroll hack

samir10:04 am

Hi guys i have just discovered how important is “No-follow” attribute is for doing SEO on you website.And while doing some research on it, i came across this cool wordpress hack which i would like to share with all.So that you can take up your website high into search engines.

So enjoy optimising the website for SEO and ready to get ranked higher into search engines.Article taken from Knowledge Constructs Website.

The method I’m going to demonstrate has actually been slightly updated as the original meant losing some of the other XFN options. This version actually adds more to the existing hack and provides a new checkbox to easily add the nofollow attribute.

Here’s the quick how-to guide for WordPress newbies on how you can do this.

The file we’re going to be hacking today is:

/wp-admin/edit-link-form.php

Before we get started, BACK UP YOUR FILE.

Okay, now for step-by-step guide on the Gray Hack:

Read more


Filed Under SEO Tips and Tricks and Wordpress hacks | 2 comments

Vertigo Electrified Theme by Brian Gardner.
Powered by WordPress.
Close
E-mail It