[wp-hackers] Getting the Post ID for a single page request
Mark Shields
laebshade at gmail.com
Wed Sep 29 15:03:53 UTC 2004
I've been able to use the $single variable since 1.2 in my Breadcrumb plugin.
On Wed, 29 Sep 2004 08:19:58 -0600, Randy Peterman
<randy at randypeterman.com> wrote:
> OK, so I've written StatTraq, which does some statistical reporting for
> WordPress and I have one person who's got a unique installation that
> won't return the post ID. In his installations he's using the
> mod_rewrite rules so that the post ID is not passed in the URL.
> However, another StatTraq user wrote the following change for my code
> that works for him:
>
> if ($single) {
> $p = intval($post->ID);
> $article_id = $p;
> }
>
> So, the question I have is if someone was using varying versions of
> WordPress would the '$single' variable not be set?
>
> Regards,
>
> --
> Randy Peterman
> Digital Research & Development
> www.randypeterman.com
> randy at randypeterman.com
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
--
- Mark Shields
More information about the hackers
mailing list