我有一個名爲編輯配置文件的頁面,我已經安裝了配置文件生成器插件,所以用戶可以從前端編輯他們的配置文件,如果用戶登錄,我想顯示編輯配置文件和註銷鏈接,是登錄。我怎麼能做到這一點?我正在使用wp-bootstrap響應主題,我是wordpress開發中的新成員,請幫助我。我是否需要更改header.php文件中的任何內容?需要在登錄用戶wordpress的菜單中編輯個人資料鏈接?
<?php
if (is_user_logged_in()) {
// i want to add Edit profile and logout to the menu
} else {
// i want to add login to the menu
} ?>
什麼WordPress版本您使用的? – Matteo
3.7.1和主題是wp-bootsstrap – Naveenbos