Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Login logout below menu bar

If your theme adheres to WordPress standards the menu is generated with a call to wp_nav_menu. This function has a filter that allows you to modify the html. Like this:

add_filter ('wp_nav_menu', 'wpse312466_add_loginlink'); 
function wpse312466_add_loginlink ($nav_menu, $args) {
  $nav_menu = '<div id="loglink"><a href="https://wordpress.stackexchange.com/link/to/loginpage">Login here</a></div>' . $nav_link
  return $nav_menu
  }

Now it depends on your css skills to get that link in the place where you want it to be.

The obvious place to stick this code is in a child theme, but you could also make it into a plugin.

Related Posts:

  1. Editing ‘Password Reset’ E-mail
  2. Change “You are now logged out” text
  3. Removing labels and tag on WordPress’s default login form
  4. Customize user account activation message
  5. How do we check if the user is logging in or registering?
  6. add filter login_redirect does not contain original requested redirect
  7. Change username before login
  8. Custom Login Errors and variables I can use
  9. Correct method of redirecting user login
  10. Filters on Login Page
  11. How can I change the email that is inside the default email texts of wordpress?
  12. How do I hook my function to run only after submitting login form
  13. Change login CSS
  14. How to redirect non-logged in users to login with post_password_required()
  15. Filter page title (displayed in browser tab) of wp-login
  16. How to redirect a unique link based on login status
  17. login_url filter creates permanent wp-admin -> wp-login redirection loop
  18. Hook into ‘when user logs in’ [persistent login]
  19. Change password reqts with NO plugin without breaking resetpass link?
  20. Not able to change wp_title using add_filter
  21. How to hook a filter to catch get_post_meta when alternate a custom field output?
  22. Changing JPEG compression depending on image size
  23. How to add headers to outgoing email?
  24. Advanced Custom Fields and Yoast SEO keyword analysis [closed]
  25. Insert Custom HTML After Shortcode
  26. Is there a way to add another row to the tinyMCE kitchen sink toggle?
  27. add_filter to youtube embeds?
  28. How can I detect if a user changes their password?
  29. SSL certificate for the host could not be verified
  30. Store source permalink on XMLRPC calls
  31. How to limit the pages displayed for choosing parent page on page attribute’s menu?
  32. WordPress RSS feed – filter RSS content by custom field value
  33. What is the filter hook for custom fields content?
  34. Filter keywords from search query
  35. Add class to woocommerce checkout body based on filter [closed]
  36. changing variable through filters or action hooks
  37. filter the_title problem in nav
  38. Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies
  39. How to replace any occurence of Gravatars with a local placeholder image?
  40. Ignore dots when searching in the media library?
  41. How to change the blog title with add_filter? details below
  42. How To Get User Data in Callback Function for pre_user_nicename?
  43. What’s the best way to split admin-only functionality in the theme’s functions.php file?
  44. the_content filter – checking the post
  45. Which built-in WordPress files are safe to edit?
  46. Why won’t my preg_replace work with content_save_pre?
  47. How do I target a single page to modify the comment form of only that page?
  48. How Does comment_author Filter Work?
  49. How to removes all instances of thumbnails displayed in my theme?
  50. Contact Form 7 filter similar to preprocess_comment [closed]
  51. Walker_Nav_Menu doesn’t work in wp_page_menu_args filter
  52. get_posts() and filters
  53. Adding TinyMCE buttons without removing plugin buttons?
  54. upload_files cap to not loggen in users – add_cap to not logged in users
  55. How to customize the “Insert/edit link” popup box?
  56. How to filter backend post list showing only posts having a shortcode
  57. Problem with login form
  58. Add Lightbox To WordPress Native Gallery
  59. What hooks to hook onto for automatic cache clearing
  60. Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
  61. Modify Redux Framework Options in Child Theme
  62. How can I output all apply_filters and do_action?
  63. Override has_post_thumbnail function
  64. How to allow code block in wordpress comments
  65. remove_action: how to access to a method in an child class?
  66. Set default value for “Additional CSS class(es)” for specific block types
  67. Contact Form 7 Custom Validation Doesn’t Get Called [closed]
  68. add_filter to wp_nav_menu_objects having no impact
  69. Trimming a custom field to a length
  70. How to add a filter to the get_body_class function?
  71. Using add_filter to modify a public function of a class
  72. How to hide/remove GhostKit component panel in gutenberg block inspector
  73. WordPress removing slashes from shortcode output
  74. when use function the_content break
  75. Adding html banner to posts
  76. How does wordpress add ‘style’ attribute to element
  77. How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value?
  78. conditional search
  79. output custom Posts on a Page
  80. Filter “Your latest posts”
  81. Is it better to use a constant or apply_filter?
  82. Hide certain product filters from specific product categories
  83. Hooked into wp_get_attachment_caption to add content to the default description; not working for jetpack slideshow. Why?
  84. WordPress Gutenberg core/heading block (wp-block-heading)
  85. Add an attribute to the root from functions.php with add_filter
  86. Would like to use hook or filters to customize email templates
  87. Removing menus from users other than the administrator
  88. Can’t understand apply_filter logic
  89. Modify oembed code conditionally
  90. Filter and validate user role in registration
  91. wordpress filtering out caps in wp_title? (UpperCase is changed to Uppercase)
  92. What scope is $blog_url = get_bloginfo() inside a function
  93. String Replace Caching & Chance of Collisions
  94. is_page_template() doesn’t work with excerpt_length filter
  95. Turn wp_tag_cloud into a front-end filter
  96. Add HTML to Page Content
  97. Filter dashboard custom post listing by user
  98. GET form action. Redirect to self
  99. Is there a way to override only a portion of the function print_media_templates defined in wp-includes\media-template.php?
  100. How to override hook from themes functions.php which is defined in plugin
Categories filters Tags filters, login
Custom rest API route not passing data along
Strange Popup Ad on my WordPress Admin Dashboard

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress