我用一些插件创建了一个wordpress水龙头网站,我想做得更好一些。
我想做一个推荐链接,所以当它是http://free-liteco.in/?r=Your-Address
, 我喜欢这个角色Your-Address
用户之间的更改,因此它会将个人资料中的用户litecoin地址放在推荐链接中,而不是说出您的地址。
我该怎么做?
我用一些插件创建了一个wordpress水龙头网站,我想做得更好一些。
我想做一个推荐链接,所以当它是http://free-liteco.in/?r=Your-Address
, 我喜欢这个角色Your-Address
用户之间的更改,因此它会将个人资料中的用户litecoin地址放在推荐链接中,而不是说出您的地址。
我该怎么做?
看看get_user_meta 作用
假设用户配置文件中的litecoin地址存储为用户元,键为litecoin_address
您可以这样输出链接:-
$litecoin_address = get_user_meta( get_current_user_id(), \'litecoin_address\', true );
if( !empty( $litecoin_address ) ){
// maybe do some additional sanitation of the litecoin address here
$link = sprintf( \'http://free-liteco.in/?r=%s\', $litecoin_address );
echo $link;
} else {
echo \'Please login and complete the litecoin address in your profile\';
}
我想知道如何从geoip插件添加国家/地区短代码(https://pl.wordpress.org/plugins/geoip-detect/) 输入注释字段。[geoip\\u detect2 property=“country”]据我所知,注释字段必须是所见即所得字段(默认情况下不是文本)。还有其他方法吗?通过自定义php函数或其他方式?你好,Michal