Title: Problems with Recent Posts.
Last modified: August 18, 2016

---

# Problems with Recent Posts.

 *  [Tarasque](https://wordpress.org/support/users/tarasque/)
 * (@tarasque)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/)
 * I’ve been trying to make work Recent Posts hack, but after I upload my-hacks.
   php with the code that is needed, I get an error saying something about “T_VARIABLE”
   whenever I try to load the frontpage of my site (that is, I haven’t even included
   the -include- code on any page, yet). I don’t understand why because I followed
   all the instructions 🙁
    Any clue? Recent Posts [http://wiki.wordpress.org/Recent%20Posts](http://wiki.wordpress.org/Recent%20Posts)
   my-hacks.php [http://wiki.wordpress.org/my-hacks.php](http://wiki.wordpress.org/my-hacks.php)

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

 *  [Mark Jaquith](https://wordpress.org/support/users/markjaquith/)
 * (@markjaquith)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105701)
 * Sounds like a typo in my-hacks.php which IS included whether you explicitly call
   for a function in it or not. Edit the file via FTP.
 *  Thread Starter [Tarasque](https://wordpress.org/support/users/tarasque/)
 * (@tarasque)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105702)
 * What do you mean with editing it via FTP?
    And how can there be a typo? I mean,
   I copy & pasted as I was told on the guides.
 *  Thread Starter [Tarasque](https://wordpress.org/support/users/tarasque/)
 * (@tarasque)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105783)
 * *bump*
    😀
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105786)
 * I think he means download the file, edit it, and upload it again. There could
   be excess whitespace or, in fact, a typo somewhere.
 *  Thread Starter [Tarasque](https://wordpress.org/support/users/tarasque/)
 * (@tarasque)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105803)
 * I’ll try that.
    Now, I just tried embedding the code in index.php, instead of
   using my-hacks.php, and I would still get the error. It seems that there’s something
   wrong with this line: global $wpdb, $tableposts; What could it be?
 *  Thread Starter [Tarasque](https://wordpress.org/support/users/tarasque/)
 * (@tarasque)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105830)
 * Worked! It seems that, for some reason, the spaces that were after the information
   were written with those characters. It’s strange, tho, because I think I also
   tried adding it using the web-panel that WordPress has…
    Still, it worked. Thanks,
   Beel!

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

The topic ‘Problems with Recent Posts.’ is closed to new replies.

 * 6 replies
 * 3 participants
 * Last reply from: [Tarasque](https://wordpress.org/support/users/tarasque/)
 * Last activity: [21 years, 7 months ago](https://wordpress.org/support/topic/problems-with-recent-posts/#post-105830)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
