The guid isn't always stored in the database, specifically for posts that are added when the blog is created. Extremely annoying.
The guid isn't always stored in the database, specifically for posts that are added when the blog is created. Extremely annoying.
From the Wordpress trac, the guid field is NOT the URL to the post, it's meant to be a global unique id. Therefore one can't depend on it being a valid URL, ever (they could change it to a number, for example, at any point). When a permalink is required in regular Wordpress, the_permalink() or get_permalink() is used, but I suspect this won't work for something in home.php because it looks to me like those functions need to be used in the context of a particular blog.
I've improved the plugin so that it doesn't show nonpublic posts, nor spam/archived/mature/deleted blog posts, and so that actual permalinks are used (ie the guid is NOT used, but rather the proper function in wpmu-functions.php).
Please see http://wiki.evernex.com/index.php?title=Wordpress_MU_sitewide_recent_posts_plugin
Yeah what I got hasn't been working out anyway. But I have an idea. Create a new table call it something like wp_All_Posts and inside have 3 columns blog id, post id, date. The pk will be a combination of blog id and post id. I order by date to get the newest posts, than use a loop to get each entry returned, run it though the get_post() function and output the results.
Two things I need to figure out to get this to work is:
1. Proper use of the get_post() function
2. How to make a new entry to my table each time a post is made.
Mysteriously not all Blogs are included in recent posts. They are not marked as spam or mature, but still neither appear in Latest Post, nor in all blogs. Any idea what could be the reason?
hmm.. got a blank page in admin panel when i put the ah-recent-post.php in /mu-plugins
no idea where to start to fix this. anyone?
what version of mu are you using? (I haven't tried it on recent versions and that's an old copy floating around)
any blank spaces at the beginning or end of the file?
« Previous 1 2