Title: Top 10 posts problem.
Last modified: August 18, 2016

---

# Top 10 posts problem.

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/top-10-posts-problem/)
 * Plugin:
    [http://weblogtoolscollection.com/archives/2005/03/14/top-10-plugin/](http://weblogtoolscollection.com/archives/2005/03/14/top-10-plugin/)
 * What I think is the code in question:
    `<li><a href=\"$siteurl"."index.php?p=".
   $post->ID."&amp;more=1&amp;c=1\" title=\"$text\"  >$post_title</a>
 * – From the main index, this plugin works fine.
    – If you click one of the top
   10 posts, you go to it, and if you then click another, you go to that – BUT, 
   if you are looking at an individual post (I’m using permalinks in the default
   structure provided) then the $siteurl seems to judged to be the permalink, so
   the top10 link is added to the permalink – so it fails.
 * Any clues as to how I may fix this ?
    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/top-10-posts-problem/#post-182338)
 * Can you not replace $siteurl with something like
    `<?php echo get_settings('home');?
   >`
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/top-10-posts-problem/#post-182341)
 * It is what $siteurl is supposed to use, but I just tested this, and you’re correct
   podz. There is something unusual going on with that global variable. Try alphaoide’s
   suggestion:
 * `<li><a href=\"".get_settings('home')."/index.php?p=".$post->ID."&amp;more=1&
   amp;c=1\" title=\"$text\"
    >$post_title</a>
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/top-10-posts-problem/#post-182342)
 * Thanks, tried that and kept getting T STRING errors – I must have done something
   wrong.
    Cured the problem by going the simple route and replacing $siteurl with
   my actual url 🙂
 * (Now for the next problem)
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/top-10-posts-problem/#post-182343)
 * Crossed with your post there Kaf 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Top 10 posts problem.’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Mark (podz)](https://wordpress.org/support/users/podz/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/top-10-posts-problem/#post-182343)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
