WordPress开发教程:更改WordPress后台LOGO及链接

站长朋友们在使用的时候,很多时候想更换掉后台的LOGO以及对应的链接,这篇里,我们就来简单介绍一下方法,感兴趣的朋友可以学习一下。

切换到主题目录,打开functions.PHP文件,加入以下代码

Crayon-5c891cef108b2824144946" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">functions.PHP
Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-mixed-highlight" title="Contains Mixed Languages">
Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
Crayon-button-icon">
Crayon-button Crayon-plain-button" title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button Crayon-expand-button" title="Expand Code">
Crayon-button-icon">
Crayon-button Crayon-copy-button" title="Copy">
Crayon-button-icon">
Crayon-button Crayon-popup-button" title="Open Code In New Window">
Crayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">Crayon-row">
Crayon-nums " data-settings="show">
Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
Crayon-num" data-line="Crayon-5c891cef108b2824144946-1">1
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-2">2
Crayon-num" data-line="Crayon-5c891cef108b2824144946-3">3
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-4">4
Crayon-num" data-line="Crayon-5c891cef108b2824144946-5">5
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-6">6
Crayon-num" data-line="Crayon-5c891cef108b2824144946-7">7
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-8">8
Crayon-num" data-line="Crayon-5c891cef108b2824144946-9">9
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-10">10
Crayon-num" data-line="Crayon-5c891cef108b2824144946-11">11
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-12">12
Crayon-num" data-line="Crayon-5c891cef108b2824144946-13">13
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-14">14
Crayon-num" data-line="Crayon-5c891cef108b2824144946-15">15
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-16">16
Crayon-num" data-line="Crayon-5c891cef108b2824144946-17">17
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cef108b2824144946-18">18
Crayon-num" data-line="Crayon-5c891cef108b2824144946-19">19
Crayon-code">
Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
Crayon-line" id="Crayon-5c891cef108b2824144946-1">Crayon-ta">PHP
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-2">Crayon-c">//更改登陆页面logo
Crayon-line" id="Crayon-5c891cef108b2824144946-3">Crayon-t">functionCrayon-h"> Crayon-e">my_custom_login_logoCrayon-sy">(Crayon-sy">)Crayon-h"> Crayon-sy">{
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-4">Crayon-k ">echoCrayon-h"> Crayon-s">''Crayon-sy">;
Crayon-line" id="Crayon-5c891cef108b2824144946-7">Crayon-sy">}
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-8">Crayon-e">add_actionCrayon-sy">(Crayon-s">'login_head'Crayon-sy">,Crayon-h"> Crayon-s">'my_custom_login_logo'Crayon-sy">)Crayon-sy">;
Crayon-line" id="Crayon-5c891cef108b2824144946-9">Crayon-c">//更改登陆页面的URL
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-10">Crayon-t">functionCrayon-h"> Crayon-e">put_my_urlCrayon-sy">(Crayon-sy">)Crayon-sy">{
Crayon-line" id="Crayon-5c891cef108b2824144946-11">Crayon-k ">returnCrayon-h"> Crayon-sy">(Crayon-s">'https://www.f2er.com/'Crayon-sy">)Crayon-sy">;Crayon-h"> Crayon-c">//换成您的URL
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-12">Crayon-sy">}
Crayon-line" id="Crayon-5c891cef108b2824144946-13">Crayon-e">add_filterCrayon-sy">(Crayon-s">'login_headerurl'Crayon-sy">,Crayon-h"> Crayon-s">'put_my_url'Crayon-sy">)Crayon-sy">;
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-14">Crayon-c">//更改登陆页面鼠标悬停显示文字
Crayon-line" id="Crayon-5c891cef108b2824144946-15">Crayon-t">functionCrayon-h"> Crayon-e">put_my_titleCrayon-sy">(Crayon-sy">)Crayon-sy">{
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-16">Crayon-k ">returnCrayon-h"> Crayon-sy">(Crayon-s">'91wordpress'Crayon-sy">)Crayon-sy">;Crayon-h"> Crayon-c">//替换成您想显示文字
Crayon-line" id="Crayon-5c891cef108b2824144946-17">Crayon-sy">}
Crayon-line Crayon-striped-line" id="Crayon-5c891cef108b2824144946-18">Crayon-e">add_filterCrayon-sy">(Crayon-s">'login_headertitle'Crayon-sy">,Crayon-h"> Crayon-s">'put_my_title'Crayon-sy">)Crayon-sy">;
Crayon-line" id="Crayon-5c891cef108b2824144946-19">

相关文章

WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL数据库的服务器上架设属于自己的...
这两段代码可以让你先体验一下WordPress 3.0的菜单样式 首先在functions.php添加如下代码: register_n...
有人说 WordPress 本身的 SEO 就比较好,我想这个和 WordPress 可以方便的自定义文章的固定链接有分不开...
曾经给大家介绍了在 WordPress 后台移除主题编辑器,今天继续加深,直接关闭 WordPress 后台的文件编辑...
WordPress之iNove主题内容页增加公告栏的方法,导航栏下面默认的公告栏只能在首页显示,只要修改一个文...
大多数WordPress用户都知道该怎么从数千个WordPress主题里挑出自己喜欢,但要自己开发新主题恐怕不是人...