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:
- Editing ‘Password Reset’ E-mail
- Change “You are now logged out” text
- Removing labels and tag on WordPress’s default login form
- Customize user account activation message
- How do we check if the user is logging in or registering?
- add filter login_redirect does not contain original requested redirect
- Change username before login
- Custom Login Errors and variables I can use
- Correct method of redirecting user login
- Filters on Login Page
- How can I change the email that is inside the default email texts of wordpress?
- How do I hook my function to run only after submitting login form
- Change login CSS
- How to redirect non-logged in users to login with post_password_required()
- Filter page title (displayed in browser tab) of wp-login
- How to redirect a unique link based on login status
- login_url filter creates permanent wp-admin -> wp-login redirection loop
- Hook into ‘when user logs in’ [persistent login]
- Change password reqts with NO plugin without breaking resetpass link?
- How to add a custom CSS class to core blocks in Gutenberg editor?
- No filter of code on switch from html to visual editor, how?
- How to modify posts_where filter only for the search query
- Filter translations (gettext strings) on specific admin pages
- Filter hook before create order WooCommerce
- How to auto-translate custom user roles?
- Adding revision support to WooCommerce product content
- Changing text within the Block Editor
- add_filter for specific pages
- How to add attribute to output with wp_video_shortcode add_filter
- Change default settings used by gallery shortcode
- PHP5, Inheritance, Singleton – action & filter hook limitations
- Please explain me what the do_action does
- How Can I Have A URL Changed Based on the Originating URL?
- Is it possible to Hook/Filters Attachment Creation?
- Add ‘if exists’ to filter
- How to hook some Unicode texts into calendar widget safely?
- how to remove filter from wordpress shortcode output
- Change email from and display name with a filter action
- How to check if “media_send_to_editor” is audio?
- Changing Order of Filters
- Please help me through this example with a filter to understand how they work
- Filter custom post types in archive
- WordPress tag cloud add more links
- How can I filter block registration based on post-type? (Block alignment settings)
- wp_insert_post_data filter not working correctly after upgrade to WordPress 5
- Yoast SEO hooks overriding themselves
- Passing variable from child theme to parent theme
- Question about how do wordpress filters/actions work
- How to center oEmbedded content
- Add Sortable Column For All Post Types
- How to take options from form fields and turn them in to links?
- When to use add_action when registering/enqueuing scripts
- Is it possible to use multiple spaces in title?
- How add a group by to the query used by the media library?
- add_filter(allowed_block_types) -> adding core/paragraph bugs Gutenberg editor
- How to properly modify WP Vary or any existing headers?
- How to remove medium size class in gravity form for input tag?
- Custom wp_query time filter on meta_value
- get post id within add_filter()
- Can I override the content array using the_posts filter?
- Media upload default title from file name
- Admin post list – adding an option to the date filter dropdown
- Use of comment_reply_link_args filter
- How to use do_shortcode_tag to modify the output of a shortcode?
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- Alter existing page contents based on url
- Error using wp_mail inside custom function
- How to include add_filter() in a condition based on $post data
- Admin: how to make a custom list filter button send GET queryvars
- Filter authors on meta value
- Override email_exists function
- Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )
- arguments for comment_notification_text filter
- Add_filter rel=”prettyphoto” to WP3.4.1
- How can i filter wordpress users by custom feild?
- How to filter the source URL of all images on every page
- auth_redirect() doesn’t send users to the page where they orginally tried to acces
- Is it possible to assign a css id to a row in plugins list table?
- How to bridge the gap between dynamic back-end data and front-end output?
- How to loop year & month condition together to filter correctly via AJAX?
- Dealing with the clickTrack event in wp-playlist.js in order to display audio download link on the playlist title row
- How to Change the WordPress Locale with the ‘locale’ Filter?
- meta box loop problem with a search filter
- How can I add a prefix to titles displayed in sidebar using function.php?
- Modify Default URL for /wp-includes/js/wp-emoji.js?ver=4.6.1
- List all image sizes still getting disabled sizes
- wp_editor customization
- What problems could happen if I replaced add_filter and add_action with the function calling
- posts_results filter function memory errors
- Adding to an array & passing it through do_action/apply_filters
- Is it possible to include the add_filter() function within a shortcode function
- Activate short codes for all post queries?
- Save something to global var in add_filter
- Loading a sidebar on an Ajax call
- the_excerpt() does not work with has_excerpt()?
- Wrapping Featured Image on Add/Edit Page in div?
- Clean/filter HTML inserted to post content by XML RPC
- how to localize the number of wordpress post views?
- How do you disable the verification process of user email changes?
- Modify the third (context) parameter in a filter?