开发者

How to set a variable in Wordpress's $wp_query

开发者 https://www.devze.com 2022-12-18 02:33 出处:网络
I\'m trying to use the set() function, to set $wp_query->query_vars[\'paged\']. What\'s the proper syntax for this funct开发者_如何学Pythonion?

I'm trying to use the set() function, to set $wp_query->query_vars['paged'].

What's the proper syntax for this funct开发者_如何学Pythonion?

Thanks.


global $wp_query;
$wp_query->set('name','value');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号