[wp-hackers] Adding Query Var for Post
Bill Smith
ml_wordpress at copperleaf.org
Tue May 15 12:48:01 GMT 2007
Austin Matzko wrote:
> On 5/15/07, Bill Smith <ml_wordpress at copperleaf.org> wrote:
>> I'm playing with a plugin that needs to add a query var to a link within
>> the_content of a post. I've been able to do that in my test environment
>> with get_permalink() . "&version=3" which results in something like
>> http://localhost/?p=10&version=3. When using permalinks, I can't blindly
>> add &version=3. I've been playing with the using_xxx_permalink methods
>> and it appears that I can simply append ?version=3 when
>> using_permalinks() returns true and append &version=3 when it returns
>> false. Is this the correct approach?
>
> I would use WordPress's own add_query_arg function instead.
Thanks! That did the trick.
More information about the wp-hackers
mailing list