dsyak22488 2016-02-12 07:23
浏览 90
已采纳

在wordpress登录表单标题中添加文本

I am trying to add text in the login form above username. i tried some code in fuctions.php file but nothing is showing in the frontend of wp-login page.

this the function i have created.

function filter_login_form_top_text( $var ) { 
// make filter magic happen here... 
$var = "Login to view the manual - into login form";
return $var; }; add_filter( 'login_form_top', 'filter_login_form_top_text', 10, 2 );

we are using default wordpress login from

i am following this link to make changes

can anyone please help me to make this changes

  • 写回答

2条回答 默认 最新

  • duanpang1987 2016-02-12 09:04
    关注
    function emqube_change_text_on_login_form($text){
       if(in_array($GLOBALS['pagenow'], array('wp-login.php'))){
         if ($text == 'Username'){$text = 'text_you_want Username';} // for login form
           if ($text == 'Username or Email:'){$text = 'text_you_want Username or Email:';} // for forgot password
            }
                return $text;
         } add_filter( 'gettext', 'emqube_change_text_on_login_form' );
    

    i added to replace the label text with the text i required...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改