如何显示允许用户仅显示个人资料页面的自定义菜单页面?

时间:2017-09-13 13:23:46

标签: wordpress plugins wordpress-thesis-theme

我想注册用户会员角色为“我想要个人教练”的自定义菜单页面。     但是,此站点中已使用的插件仅在特定用户的仪表板上显示配置文件页面。         现在我想强制它为会员角色为“我想要个人培训师”的用户展示     这是我的代码

var PersonalityInsightsV3 = require('watson-developer-cloud/personality-insights/v3');
var personality_insights = new PersonalityInsightsV3({
  username: '{username}',
  password: '{password}',
  version_date: '2016-10-20'
});

var params = {
  // Get the content items from the JSON file.
  content_items: require('./profile.json').contentItems,
  consumption_preferences: true,
  raw_scores: true,
  headers: {
    'accept-language': 'en',
    'accept': 'application/json'
  }
};

personality_insights.profile(params, function(error, response) {
  if (error)
    console.log('Error:', error);
  else
    console.log(JSON.stringify(response, null, 2));
  }
);

0 个答案:

没有答案