[wp-hackers] wp_get_shortlink won`t work ever?

Dion Hulse (dd32) wordpress at dd32.id.au
Tue May 8 00:25:53 UTC 2012

wp_get_shortlink() only works for posts, it doesn't work for pages (as
the trac ticket you found suggests) or custom post types.
If you're wanting to output a post ID, there are functions to do that,
such as this:

echo get_post_id();

On 8 May 2012 08:17, Diana K. C <dianakac at gmail.com> wrote:
> I was trying to output post types ids within the loop, and nada shows up. I found this:
> http://core.trac.wordpress.org/ticket/14760
> Is not working, or I am missing something?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list