Ollie1700
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to make blog index appear only as login pageThanks hostknox, this seems like a nice simple workaround. Could anyone confirm if this is a safe/correct way to do this?
Forum: Fixing WordPress
In reply to: How can I get most recent post without using wp_get_recent_postsBecause it would require a lot of re-coding as I have set it all up with arrays already. I guess I will have to do that though. Thanks for your help, I’ll use your method.
Forum: Fixing WordPress
In reply to: How can I get most recent post without using wp_get_recent_postsThanks for your quick response.
Is there any way I can get the post as an array though? At the moment, I have two cases: there is no specified post id via _GET so it loads the most recent one, there is a post id specified in _GET so it loads that one. The second case works fine as I get the post as an array using
$post = get_post($_GET['postid'], ARRAY_A);
Then I can display post stuff using $post[‘post_title/content/author/etc.’]
If I have to use the method you suggested then I will have a lot of re-coding to do using the post as an object instead of an array.So is there any way to get the post as an array rather than an object?
Thanks again.