Technical Question: Affect of certain changes on index.php (Wordpress) on SEO
- SEO |
I added this little piece of code to the index.php on one of my WordPress-based sites:
<?php
$sticky = get_option( 'sticky_posts' );
query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1, 'orderby' => ID, 'showposts' => 2 ) );
?>
The reason I added this code was, I had a sticky post which I wanted to be displayed on the homepage all the time. And I set options to show only 1 blog post on the frontpage. And I wanted that 1 post to be the sticky post.
But what happened was, it displayed the sticky post as well as a recent post I wrote.
So when I set the options to show only 1 post, it didn't take the sticky post into account.
And that's why I added the code shown above.
Now it does exactly what I wanted: It shows only the sticky post on the frontpage.
BUT
Because of that code, what it does is.... even if I try to visit the single post page of any other post (besides the sticky post).... it still shows the sticky post!
So for example if I hit: MyDomain(dot)com/mylatestpost
It will not show the "mylatestpost".... instead it will grab the sticky post and show that.
So if there are lets say 100 posts, all those posts pages will show the same sticky post rather than the relevant post itself.
I hope this makes sense.
So my question is: Will this affect the SEO of my site? Will Google consider it as duplicate content?
Thanks for reading!
Regards,
Osman
-
rooze -
[ 1 ] Thanks
SignatureWordpress and Joomla web design{{ DiscussionBoard.errors[5656093].message }} -
-
Osman Safdar -
Thanks
{{ DiscussionBoard.errors[5658791].message }} -
-
Osman Safdar -
Thanks
{{ DiscussionBoard.errors[5660440].message }} -
-
Istvan Horvath -
[ 1 ] Thanks
Signature{{ DiscussionBoard.errors[5661238].message }} -