[wp-hackers] Get URL of page with shortcode
eddie at teamcolab.com
Wed Feb 2 05:59:48 UTC 2011
It seems that you could put the following code inside the shortcode
$url = get_permalink($post->ID);
$url will equal the permalink of the post that is parsing the shortcode.
On Tue, Feb 1, 2011 at 10:41 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:
> I am looking for a way in my plugin the get the URL for the page which
> contains a specific shortcode for my plugin, is there an easy way to do
> this, or do I need to do a query with wpdb against the page content?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
201 W 7th St.
Richmond, VA 23224
More information about the wp-hackers